From 98edf76fbcbdca6e9872f4c9b5f5cfa075ce5b3f Mon Sep 17 00:00:00 2001 From: Gord Pearson Date: Wed, 10 Jun 2026 07:51:30 -0400 Subject: [PATCH] Update sorbet, rbs, and rbis; drop ruby 3.1 --- .github/workflows/ruby.yml | 2 +- Gemfile | 5 +- Gemfile.lock | 109 +- cli-ui.gemspec | 4 +- lib/cli/ui.rb | 5 +- lib/cli/ui/frame.rb | 5 +- sorbet/config | 2 + sorbet/rbi/gems/.gitattributes | 1 + .../gems/{ansi@1.5.0.rbi => ansi@1.6.0.rbi} | 3 +- sorbet/rbi/gems/ast@2.4.2.rbi | 54 - sorbet/rbi/gems/ast@2.4.3.rbi | 550 + sorbet/rbi/gems/benchmark@0.5.0.rbi | 621 + .../{builder@3.2.4.rbi => builder@3.3.0.rbi} | 8 +- sorbet/rbi/gems/byebug@11.1.3.rbi | 18 - sorbet/rbi/gems/byebug@13.0.0.rbi | 49 + sorbet/rbi/gems/coderay@1.1.3.rbi | 8 - sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 189 - sorbet/rbi/gems/docile@1.4.0.rbi | 54 - sorbet/rbi/gems/docile@1.4.1.rbi | 9 + sorbet/rbi/gems/drb@2.2.3.rbi | 9 + sorbet/rbi/gems/erubi@1.13.1.rbi | 155 + sorbet/rbi/gems/io-console@0.8.2.rbi | 9 + sorbet/rbi/gems/json@2.19.8.rbi | 2240 + .../language_server-protocol@3.17.0.5.rbi | 9 + sorbet/rbi/gems/lint_roller@1.1.0.rbi | 9 + sorbet/rbi/gems/logger@1.7.0.rbi | 896 + sorbet/rbi/gems/method_source@1.0.0.rbi | 72 - sorbet/rbi/gems/method_source@1.1.0.rbi | 9 + ...1.5.0.rbi => minitest-reporters@1.8.0.rbi} | 3 +- sorbet/rbi/gems/minitest@5.15.0.rbi | 524 - sorbet/rbi/gems/minitest@6.0.6.rbi | 1856 + sorbet/rbi/gems/mocha@1.13.0.rbi | 983 - sorbet/rbi/gems/mocha@3.1.0.rbi | 3980 ++ sorbet/rbi/gems/netrc@0.11.0.rbi | 147 + sorbet/rbi/gems/parallel@1.21.0.rbi | 113 - sorbet/rbi/gems/parallel@2.1.0.rbi | 321 + sorbet/rbi/gems/parser@3.1.0.0.rbi | 1761 - sorbet/rbi/gems/parser@3.3.11.1.rbi | 5229 ++ sorbet/rbi/gems/prism@1.9.0.rbi | 42224 ++++++++++++++++ sorbet/rbi/gems/pry@0.14.1.rbi | 8 - sorbet/rbi/gems/racc@1.8.1.rbi | 165 + sorbet/rbi/gems/rake@13.0.6.rbi | 805 - sorbet/rbi/gems/rake@13.4.2.rbi | 3127 ++ sorbet/rbi/gems/rbi@0.0.9.rbi | 1602 - sorbet/rbi/gems/rbi@0.3.13.rbi | 5519 ++ sorbet/rbi/gems/rbs@4.0.2.rbi | 6908 +++ sorbet/rbi/gems/regexp_parser@2.12.0.rbi | 9 + sorbet/rbi/gems/regexp_parser@2.2.0.rbi | 1131 - sorbet/rbi/gems/reline@0.6.3.rbi | 2446 + sorbet/rbi/gems/require-hooks@0.4.0.rbi | 152 + sorbet/rbi/gems/rexml@3.2.5.rbi | 672 - sorbet/rbi/gems/rexml@3.4.4.rbi | 4905 ++ sorbet/rbi/gems/rubocop-ast@1.15.1.rbi | 1923 - sorbet/rbi/gems/rubocop-ast@1.49.1.rbi | 9 + sorbet/rbi/gems/rubocop-rake@0.6.0.rbi | 118 - sorbet/rbi/gems/rubocop-rake@0.7.1.rbi | 9 + ...y@2.4.0.rbi => rubocop-shopify@2.18.0.rbi} | 3 +- sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi | 9 + sorbet/rbi/gems/rubocop-sorbet@0.6.5.rbi | 295 - sorbet/rbi/gems/rubocop@1.24.1.rbi | 13507 ----- sorbet/rbi/gems/rubocop@1.87.0.rbi | 9 + sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi | 405 - sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 9 + sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi | 9 + sorbet/rbi/gems/rubydex@0.2.5.rbi | 806 + sorbet/rbi/gems/simplecov-html@0.12.3.rbi | 89 - sorbet/rbi/gems/simplecov-html@0.13.2.rbi | 9 + sorbet/rbi/gems/simplecov@0.21.2.rbi | 577 - sorbet/rbi/gems/simplecov@0.22.0.rbi | 9 + ...rbi => simplecov_json_formatter@0.1.4.rbi} | 3 +- sorbet/rbi/gems/spoom@1.1.7.rbi | 1252 - sorbet/rbi/gems/spoom@1.7.16.rbi | 6209 +++ sorbet/rbi/gems/tapioca@0.19.1.rbi | 3556 ++ sorbet/rbi/gems/tapioca@0.6.1.rbi | 1197 - sorbet/rbi/gems/thor@1.2.1.rbi | 844 - sorbet/rbi/gems/thor@1.5.0.rbi | 3870 ++ sorbet/rbi/gems/tsort@0.2.0.rbi | 389 + .../rbi/gems/unicode-display_width@2.1.0.rbi | 26 - .../rbi/gems/unicode-display_width@3.2.0.rbi | 9 + sorbet/rbi/gems/unicode-emoji@4.2.0.rbi | 9 + sorbet/rbi/gems/unparser@0.6.3.rbi | 1816 - sorbet/rbi/gems/webrick@1.7.0.rbi | 595 - sorbet/rbi/gems/yard-sorbet@0.6.1.rbi | 199 - sorbet/rbi/gems/yard@0.9.27.rbi | 4106 -- 84 files changed, 96563 insertions(+), 35006 deletions(-) create mode 100644 sorbet/rbi/gems/.gitattributes rename sorbet/rbi/gems/{ansi@1.5.0.rbi => ansi@1.6.0.rbi} (73%) delete mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi create mode 100644 sorbet/rbi/gems/ast@2.4.3.rbi create mode 100644 sorbet/rbi/gems/benchmark@0.5.0.rbi rename sorbet/rbi/gems/{builder@3.2.4.rbi => builder@3.3.0.rbi} (58%) delete mode 100644 sorbet/rbi/gems/byebug@11.1.3.rbi create mode 100644 sorbet/rbi/gems/byebug@13.0.0.rbi delete mode 100644 sorbet/rbi/gems/coderay@1.1.3.rbi delete mode 100644 sorbet/rbi/gems/diff-lcs@1.5.0.rbi delete mode 100644 sorbet/rbi/gems/docile@1.4.0.rbi create mode 100644 sorbet/rbi/gems/docile@1.4.1.rbi create mode 100644 sorbet/rbi/gems/drb@2.2.3.rbi create mode 100644 sorbet/rbi/gems/erubi@1.13.1.rbi create mode 100644 sorbet/rbi/gems/io-console@0.8.2.rbi create mode 100644 sorbet/rbi/gems/json@2.19.8.rbi create mode 100644 sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi create mode 100644 sorbet/rbi/gems/lint_roller@1.1.0.rbi create mode 100644 sorbet/rbi/gems/logger@1.7.0.rbi delete mode 100644 sorbet/rbi/gems/method_source@1.0.0.rbi create mode 100644 sorbet/rbi/gems/method_source@1.1.0.rbi rename sorbet/rbi/gems/{minitest-reporters@1.5.0.rbi => minitest-reporters@1.8.0.rbi} (75%) delete mode 100644 sorbet/rbi/gems/minitest@5.15.0.rbi create mode 100644 sorbet/rbi/gems/minitest@6.0.6.rbi delete mode 100644 sorbet/rbi/gems/mocha@1.13.0.rbi create mode 100644 sorbet/rbi/gems/mocha@3.1.0.rbi create mode 100644 sorbet/rbi/gems/netrc@0.11.0.rbi delete mode 100644 sorbet/rbi/gems/parallel@1.21.0.rbi create mode 100644 sorbet/rbi/gems/parallel@2.1.0.rbi delete mode 100644 sorbet/rbi/gems/parser@3.1.0.0.rbi create mode 100644 sorbet/rbi/gems/parser@3.3.11.1.rbi create mode 100644 sorbet/rbi/gems/prism@1.9.0.rbi delete mode 100644 sorbet/rbi/gems/pry@0.14.1.rbi create mode 100644 sorbet/rbi/gems/racc@1.8.1.rbi delete mode 100644 sorbet/rbi/gems/rake@13.0.6.rbi create mode 100644 sorbet/rbi/gems/rake@13.4.2.rbi delete mode 100644 sorbet/rbi/gems/rbi@0.0.9.rbi create mode 100644 sorbet/rbi/gems/rbi@0.3.13.rbi create mode 100644 sorbet/rbi/gems/rbs@4.0.2.rbi create mode 100644 sorbet/rbi/gems/regexp_parser@2.12.0.rbi delete mode 100644 sorbet/rbi/gems/regexp_parser@2.2.0.rbi create mode 100644 sorbet/rbi/gems/reline@0.6.3.rbi create mode 100644 sorbet/rbi/gems/require-hooks@0.4.0.rbi delete mode 100644 sorbet/rbi/gems/rexml@3.2.5.rbi create mode 100644 sorbet/rbi/gems/rexml@3.4.4.rbi delete mode 100644 sorbet/rbi/gems/rubocop-ast@1.15.1.rbi create mode 100644 sorbet/rbi/gems/rubocop-ast@1.49.1.rbi delete mode 100644 sorbet/rbi/gems/rubocop-rake@0.6.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-rake@0.7.1.rbi rename sorbet/rbi/gems/{rubocop-shopify@2.4.0.rbi => rubocop-shopify@2.18.0.rbi} (75%) create mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi delete mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.6.5.rbi delete mode 100644 sorbet/rbi/gems/rubocop@1.24.1.rbi create mode 100644 sorbet/rbi/gems/rubocop@1.87.0.rbi delete mode 100644 sorbet/rbi/gems/ruby-progressbar@1.11.0.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/rubydex@0.2.5.rbi delete mode 100644 sorbet/rbi/gems/simplecov-html@0.12.3.rbi create mode 100644 sorbet/rbi/gems/simplecov-html@0.13.2.rbi delete mode 100644 sorbet/rbi/gems/simplecov@0.21.2.rbi create mode 100644 sorbet/rbi/gems/simplecov@0.22.0.rbi rename sorbet/rbi/gems/{simplecov_json_formatter@0.1.3.rbi => simplecov_json_formatter@0.1.4.rbi} (76%) delete mode 100644 sorbet/rbi/gems/spoom@1.1.7.rbi create mode 100644 sorbet/rbi/gems/spoom@1.7.16.rbi create mode 100644 sorbet/rbi/gems/tapioca@0.19.1.rbi delete mode 100644 sorbet/rbi/gems/tapioca@0.6.1.rbi delete mode 100644 sorbet/rbi/gems/thor@1.2.1.rbi create mode 100644 sorbet/rbi/gems/thor@1.5.0.rbi create mode 100644 sorbet/rbi/gems/tsort@0.2.0.rbi delete mode 100644 sorbet/rbi/gems/unicode-display_width@2.1.0.rbi create mode 100644 sorbet/rbi/gems/unicode-display_width@3.2.0.rbi create mode 100644 sorbet/rbi/gems/unicode-emoji@4.2.0.rbi delete mode 100644 sorbet/rbi/gems/unparser@0.6.3.rbi delete mode 100644 sorbet/rbi/gems/webrick@1.7.0.rbi delete mode 100644 sorbet/rbi/gems/yard-sorbet@0.6.1.rbi delete mode 100644 sorbet/rbi/gems/yard@0.9.27.rbi diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2c0a5491..65268bac 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - ruby-version: ['3.1', '3.2', '3.3', '3.4'] + ruby-version: ['3.2', '3.3', '3.4'] runs-on: ${{ matrix.os }} env: diff --git a/Gemfile b/Gemfile index b971adb6..5032500a 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,9 @@ source 'https://rubygems.org' gemspec group :development, :test do + # parallel 2.x requires Ruby >= 3.3, but CI runs 3.2. Pin to the last 1.x + # release (supports Ruby >= 2.7). Pulled in transitively by rubocop/tapioca. + gem 'parallel', '< 2' gem 'rubocop' gem 'rubocop-rake' gem 'rubocop-shopify' @@ -22,6 +25,6 @@ end group :test do gem 'mocha', require: false - gem 'minitest', '>= 5.0.0', require: false + gem 'minitest', require: false gem 'minitest-reporters', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index a8d904fd..42217625 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,119 +6,136 @@ PATH GEM remote: https://rubygems.org/ specs: - ansi (1.5.0) + ansi (1.6.0) ast (2.4.3) - benchmark (0.4.1) + benchmark (0.5.0) builder (3.3.0) - byebug (12.0.0) + byebug (13.0.0) + reline (>= 0.6.0) docile (1.4.1) + drb (2.2.3) erubi (1.13.1) - json (2.15.1) + io-console (0.8.2) + json (2.19.8) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) method_source (1.1.0) - minitest (5.25.5) - minitest-reporters (1.7.1) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + minitest-reporters (1.8.0) ansi builder - minitest (>= 5.0) + minitest (>= 5.0, < 7) ruby-progressbar - mocha (2.7.1) + mocha (3.1.0) ruby2_keywords (>= 0.0.5) netrc (0.11.0) - parallel (1.27.0) - parser (3.3.9.0) + parallel (1.28.0) + parser (3.3.11.1) ast (~> 2.4.1) racc - prism (1.5.1) + prism (1.9.0) racc (1.8.1) rainbow (3.1.1) - rake (13.3.0) - rbi (0.3.6) + rake (13.4.2) + rbi (0.3.13) prism (~> 1.0) - rbs (>= 3.4.4) - rbs (3.9.5) + rbs (>= 4.0.1) + rbs (4.0.2) logger - regexp_parser (2.11.3) + prism (>= 1.6.0) + tsort + regexp_parser (2.12.0) + reline (0.6.3) + io-console (~> 0.5) + require-hooks (0.4.0) rexml (3.4.4) - rubocop (1.81.1) + rubocop (1.87.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.47.1, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.47.1) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) - rubocop-shopify (2.17.1) + rubocop-shopify (2.18.0) rubocop (~> 1.62) - rubocop-sorbet (0.10.5) + rubocop-sorbet (0.12.0) lint_roller rubocop (>= 1.75.2) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) + rubydex (0.2.5-aarch64-linux) + rubydex (0.2.5-arm64-darwin) + rubydex (0.2.5-x86_64-darwin) + rubydex (0.2.5-x86_64-linux) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - sorbet (0.6.12627) - sorbet-static (= 0.6.12627) - sorbet-runtime (0.6.12627) - sorbet-static (0.6.12627-aarch64-linux) - sorbet-static (0.6.12627-universal-darwin) - sorbet-static (0.6.12627-x86_64-linux) - sorbet-static-and-runtime (0.6.12627) - sorbet (= 0.6.12627) - sorbet-runtime (= 0.6.12627) - spoom (1.6.3) + sorbet (0.6.13294) + sorbet-static (= 0.6.13294) + sorbet-runtime (0.6.13294) + sorbet-static (0.6.13294-aarch64-linux) + sorbet-static (0.6.13294-universal-darwin) + sorbet-static (0.6.13294-x86_64-linux) + sorbet-static-and-runtime (0.6.13294) + sorbet (= 0.6.13294) + sorbet-runtime (= 0.6.13294) + spoom (1.7.16) erubi (>= 1.10.0) prism (>= 0.28.0) rbi (>= 0.3.3) + rbs (>= 4.0.0.dev.5) rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - tapioca (0.16.11) + tapioca (0.19.1) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.2) - sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.2.0) + rbi (>= 0.3.7) + require-hooks (>= 0.2.2) + rubydex (>= 0.1.0.beta10) + sorbet-static-and-runtime (>= 0.6.12698) + spoom (>= 1.7.9) thor (>= 1.2.0) - yard-sorbet - thor (1.4.0) + tsort + thor (1.5.0) + tsort (0.2.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) - yard (0.9.37) - yard-sorbet (0.9.0) - sorbet-runtime - yard + unicode-emoji (4.2.0) PLATFORMS aarch64-linux + arm64-darwin universal-darwin + x86_64-darwin x86_64-linux DEPENDENCIES byebug cli-ui! method_source - minitest (>= 5.0.0) + minitest (>= 5.0, >= 0, < 7) minitest-reporters mocha + parallel (< 2) rake (~> 13.0) rubocop rubocop-rake @@ -129,4 +146,4 @@ DEPENDENCIES tapioca BUNDLED WITH - 2.6.7 + 2.7.2 diff --git a/cli-ui.gemspec b/cli-ui.gemspec index 0da3ba6f..a8f187ad 100644 --- a/cli-ui.gemspec +++ b/cli-ui.gemspec @@ -21,7 +21,9 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] + spec.required_ruby_version = '>= 3.2' + # spec.add_development_dependency "bundler", "~> 2.0" - spec.add_development_dependency('minitest', '~> 5.0') + spec.add_development_dependency('minitest', '>= 5.0', '< 7') spec.add_development_dependency('rake', '~> 13.0') end diff --git a/lib/cli/ui.rb b/lib/cli/ui.rb index 165fde36..3360d3b5 100644 --- a/lib/cli/ui.rb +++ b/lib/cli/ui.rb @@ -197,17 +197,18 @@ def puts( # * +args+ - arguments for +Frame.open+ # * +block+ - block for +Frame.open+ # - #: [T] (String text, ?color: colorable?, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool), ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T? + #: [T] (String text, ?color: colorable?, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool)?, ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T? def frame( text, color: Frame::DEFAULT_FRAME_COLOR, failure_text: nil, success_text: nil, - timing: block_given?, + timing: nil, frame_style: Frame.frame_style, to: $stdout, &block ) + timing = block_given? if timing.nil? CLI::UI::Frame.open( text, color: color, diff --git a/lib/cli/ui/frame.rb b/lib/cli/ui/frame.rb index 88dbf30d..17b7cc50 100644 --- a/lib/cli/ui/frame.rb +++ b/lib/cli/ui/frame.rb @@ -72,17 +72,18 @@ def frame_style=(frame_style) # ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # # - #: [T] (String text, ?color: colorable, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool), ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T? + #: [T] (String text, ?color: colorable, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool)?, ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T? def open( text, color: DEFAULT_FRAME_COLOR, failure_text: nil, success_text: nil, - timing: block_given?, + timing: nil, frame_style: self.frame_style, to: $stdout, &block ) + timing = block_given? if timing.nil? frame_style = CLI::UI.resolve_style(frame_style) color = CLI::UI.resolve_color(color) diff --git a/sorbet/config b/sorbet/config index 47f5a2fb..a65a640e 100644 --- a/sorbet/config +++ b/sorbet/config @@ -2,3 +2,5 @@ . --ignore=vendor/bundle --enable-experimental-rbs-comments +--parser=prism + diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 00000000..d9bb82a4 --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/gems/ansi@1.5.0.rbi b/sorbet/rbi/gems/ansi@1.6.0.rbi similarity index 73% rename from sorbet/rbi/gems/ansi@1.5.0.rbi rename to sorbet/rbi/gems/ansi@1.6.0.rbi index b0d20b14..c4922074 100644 --- a/sorbet/rbi/gems/ansi@1.5.0.rbi +++ b/sorbet/rbi/gems/ansi@1.6.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `ansi` gem. # Please instead update this file by running `bin/tapioca gem ansi`. + # THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi deleted file mode 100644 index 687dae5b..00000000 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ /dev/null @@ -1,54 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ast` gem. -# Please instead update this file by running `bin/tapioca gem ast`. - -module AST; end - -class AST::Node - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - def +(array); end - def <<(element); end - def ==(other); end - def append(element); end - def children; end - def clone; end - def concat(array); end - def deconstruct; end - def dup; end - def eql?(other); end - def hash; end - def inspect(indent = T.unsafe(nil)); end - def to_a; end - def to_ast; end - def to_s(indent = T.unsafe(nil)); end - def to_sexp(indent = T.unsafe(nil)); end - def to_sexp_array; end - def type; end - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - - protected - - def assign_properties(properties); end - def fancy_type; end - - private - - def original_dup; end -end - -class AST::Processor - include ::AST::Processor::Mixin -end - -module AST::Processor::Mixin - def handler_missing(node); end - def process(node); end - def process_all(nodes); end -end - -module AST::Sexp - def s(type, *children); end -end diff --git a/sorbet/rbi/gems/ast@2.4.3.rbi b/sorbet/rbi/gems/ast@2.4.3.rbi new file mode 100644 index 00000000..e946b008 --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.3.rbi @@ -0,0 +1,550 @@ +# 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. +# +# pkg:gem/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. +# +# pkg:gem/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}. + # + # pkg:gem/ast#lib/ast/node.rb:72 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # pkg:gem/ast#lib/ast/node.rb:172 + def +(array); end + + # pkg:gem/ast#lib/ast/node.rb:181 + def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # pkg:gem/ast#lib/ast/node.rb:153 + def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # pkg:gem/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] + # + # pkg:gem/ast#lib/ast/node.rb:56 + def children; end + + # pkg:gem/ast#lib/ast/node.rb:118 + def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # pkg:gem/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] + # + # pkg:gem/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 + # + # pkg:gem/ast#lib/ast/node.rb:115 + def dup; end + + # Test if other object is equal to + # @param [Object] other + # @return [Boolean] + # + # pkg:gem/ast#lib/ast/node.rb:85 + def eql?(other); end + + # Returns the precomputed hash value for this node + # @return [Integer] + # + # pkg:gem/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 [Integer] indent Base indentation level. + # @return [String] + # + # pkg:gem/ast#lib/ast/node.rb:211 + def inspect(indent = T.unsafe(nil)); end + + # pkg:gem/ast#lib/ast/node.rb:57 + def to_a; end + + # @return [AST::Node] self + # + # pkg:gem/ast#lib/ast/node.rb:229 + def to_ast; end + + # pkg:gem/ast#lib/ast/node.rb:204 + def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param [Integer] indent Base indentation level. + # @return [String] + # + # pkg:gem/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] + # + # pkg:gem/ast#lib/ast/node.rb:237 + def to_sexp_array; end + + # Returns the type of this node. + # @return [Symbol] + # + # pkg:gem/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 [Symbol, nil] type + # @param [Array, nil] children + # @param [Hash, nil] properties + # @return [AST::Node] + # + # pkg:gem/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] + # + # pkg:gem/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] + # + # pkg:gem/ast#lib/ast/node.rb:264 + def fancy_type; end + + private + + # pkg:gem/ast#lib/ast/node.rb:107 + def original_dup; end +end + +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# pkg:gem/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. +# +# pkg:gem/ast#lib/ast/processor/mixin.rb:240 +module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param [AST::Node] node + # @return [AST::Node, nil] + # + # pkg:gem/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 [AST::Node, nil] node + # @return [AST::Node, nil] + # + # pkg:gem/ast#lib/ast/processor/mixin.rb:251 + def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param [Array] nodes + # @return [Array] + # + # pkg:gem/ast#lib/ast/processor/mixin.rb:274 + def process_all(nodes); end +end + +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage do +# include ::AST::Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# pkg:gem/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. + # + # pkg:gem/ast#lib/ast/sexp.rb:26 + def s(type, *children); end +end diff --git a/sorbet/rbi/gems/benchmark@0.5.0.rbi b/sorbet/rbi/gems/benchmark@0.5.0.rbi new file mode 100644 index 00000000..1c75f8e1 --- /dev/null +++ b/sorbet/rbi/gems/benchmark@0.5.0.rbi @@ -0,0 +1,621 @@ +# 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 total time +# (sum of user CPU time, system CPU time, children's user CPU time, +# and children's system CPU time), 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) +# +# pkg:gem/benchmark#lib/benchmark.rb:123 +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) + # + # pkg:gem/benchmark#lib/benchmark.rb:171 + 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) + # + # pkg:gem/benchmark#lib/benchmark.rb:216 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:258 + 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) + # + # pkg:gem/benchmark#lib/benchmark.rb:303 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:335 + def ms; end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:322 + 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) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + 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) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + 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) + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + def ms; end + + # Returns the elapsed real time used to execute the given block. + # The unit of time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 + # + # pkg:gem/benchmark#lib/benchmark.rb:341 + 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. +# +# pkg:gem/benchmark#lib/benchmark.rb:347 +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. + # + # pkg:gem/benchmark#lib/benchmark.rb:355 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # pkg:gem/benchmark#lib/benchmark.rb:363 + def item(label = T.unsafe(nil), &blk); end + + # An array of 2-element arrays, consisting of label and block pairs. + # + # pkg:gem/benchmark#lib/benchmark.rb:375 + def list; end + + # pkg:gem/benchmark#lib/benchmark.rb:372 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # pkg:gem/benchmark#lib/benchmark.rb:378 + 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. +# +# pkg:gem/benchmark#lib/benchmark.rb:385 +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. + # + # pkg:gem/benchmark#lib/benchmark.rb:393 + def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def format; end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # pkg:gem/benchmark#lib/benchmark.rb:402 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def list; end + + # pkg:gem/benchmark#lib/benchmark.rb:409 + def report(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # pkg:gem/benchmark#lib/benchmark.rb:412 + def width; end +end + +# A data object, representing the times associated with a benchmark +# measurement. +# +# pkg:gem/benchmark#lib/benchmark.rb:421 +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. + # + # pkg:gem/benchmark#lib/benchmark.rb:456 + 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+. + # + # pkg:gem/benchmark#lib/benchmark.rb:504 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:491 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:498 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:511 + 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+). + # + # pkg:gem/benchmark#lib/benchmark.rb:465 + 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+). + # + # pkg:gem/benchmark#lib/benchmark.rb:475 + def add!(&blk); end + + # System CPU time of children + # + # pkg:gem/benchmark#lib/benchmark.rb:439 + def cstime; end + + # User CPU time of children + # + # pkg:gem/benchmark#lib/benchmark.rb:436 + 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 Tms#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, total and real elapsed time. + # + # pkg:gem/benchmark#lib/benchmark.rb:530 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # pkg:gem/benchmark#lib/benchmark.rb:448 + def label; end + + # Elapsed real time + # + # pkg:gem/benchmark#lib/benchmark.rb:442 + def real; end + + # System CPU time + # + # pkg:gem/benchmark#lib/benchmark.rb:433 + 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. + # + # pkg:gem/benchmark#lib/benchmark.rb:555 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # pkg:gem/benchmark#lib/benchmark.rb:562 + def to_h; end + + # Same as #format. + # + # pkg:gem/benchmark#lib/benchmark.rb:545 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # pkg:gem/benchmark#lib/benchmark.rb:445 + def total; end + + # User CPU time + # + # pkg:gem/benchmark#lib/benchmark.rb:430 + 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 +, -, + # *, / + # + # pkg:gem/benchmark#lib/benchmark.rb:583 + def memberwise(op, x); end +end + +# pkg:gem/benchmark#lib/benchmark.rb:125 +Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi similarity index 58% rename from sorbet/rbi/gems/builder@3.2.4.rbi rename to sorbet/rbi/gems/builder@3.3.0.rbi index b3eb70a9..177ba9ae 100644 --- a/sorbet/rbi/gems/builder@3.2.4.rbi +++ b/sorbet/rbi/gems/builder@3.3.0.rbi @@ -4,10 +4,6 @@ # This is an autogenerated file for types exported from the `builder` gem. # Please instead update this file by running `bin/tapioca gem builder`. -class Integer < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Integer -end -class Symbol - include ::Comparable -end +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi deleted file mode 100644 index cdee3844..00000000 --- a/sorbet/rbi/gems/byebug@11.1.3.rbi +++ /dev/null @@ -1,18 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `byebug` gem. -# Please instead update this file by running `bin/tapioca gem byebug`. - -module Byebug - class << self - def attach; end - def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end - end -end - -module Kernel - def byebug; end - def debugger; end - def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/byebug@13.0.0.rbi b/sorbet/rbi/gems/byebug@13.0.0.rbi new file mode 100644 index 00000000..3933c39f --- /dev/null +++ b/sorbet/rbi/gems/byebug@13.0.0.rbi @@ -0,0 +1,49 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `byebug` gem. +# Please instead update this file by running `bin/tapioca gem byebug`. + + +# Main Container for all of Byebug's code +# +# +# Main debugger's container module. Everything is defined under this module +# +# +# Namespace for all of byebug's code +# +# +# Remote debugging functionality. +# +# +# Reopen main module to define the library version +# +# pkg:gem/byebug#lib/byebug/attacher.rb:6 +module Byebug + class << self + # Starts byebug, and stops at the first line of user's code. + # + # pkg:gem/byebug#lib/byebug/attacher.rb:10 + def attach; end + + # pkg:gem/byebug#lib/byebug/attacher.rb:21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + end +end + +# Adds a `byebug` method to the Kernel module. +# +# Dropping a `byebug` call anywhere in your code, you get a debug prompt. +# +# pkg:gem/byebug#lib/byebug/attacher.rb:34 +module Kernel + # pkg:gem/byebug#lib/byebug/attacher.rb:35 + def byebug; end + + # pkg:gem/byebug#lib/byebug/attacher.rb:47 + def debugger; end + + # pkg:gem/byebug#lib/byebug/attacher.rb:41 + def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi deleted file mode 100644 index f6507c77..00000000 --- a/sorbet/rbi/gems/coderay@1.1.3.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `coderay` gem. -# Please instead update this file by running `bin/tapioca gem coderay`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi deleted file mode 100644 index 1002d436..00000000 --- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ /dev/null @@ -1,189 +0,0 @@ -# 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`. - -module Diff; end - -module Diff::LCS - def diff(other, callbacks = T.unsafe(nil), &block); end - def lcs(other, &block); end - def patch(patchset); end - def patch!(patchset); end - def patch_me(patchset); end - def sdiff(other, callbacks = T.unsafe(nil), &block); end - def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end - def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end - def unpatch(patchset); end - def unpatch!(patchset); end - def unpatch_me(patchset); end - - class << self - def LCS(seq1, seq2, &block); end - def callbacks_for(callbacks); end - def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - def lcs(seq1, seq2, &block); end - def patch(src, patchset, direction = T.unsafe(nil)); end - def patch!(src, patchset); end - def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end - def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end - def unpatch!(src, patchset); end - - private - - def diff_traversal(method, seq1, seq2, callbacks, &block); end - end -end - -Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks - -class Diff::LCS::Block - def initialize(chunk); end - - def changes; end - def diff_size; end - def insert; end - def op; end - def remove; end -end - -class Diff::LCS::Change - include ::Comparable - - def initialize(*args); end - - def <=>(other); end - def ==(other); end - def action; end - def adding?; end - def changed?; end - def deleting?; end - def element; end - def finished_a?; end - def finished_b?; end - def inspect(*_args); end - def position; end - def to_a; end - def to_ary; end - def unchanged?; end - - class << self - def from_a(arr); end - def valid_action?(action); end - end -end - -Diff::LCS::Change::IntClass = Integer -Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) - -class Diff::LCS::ContextChange < ::Diff::LCS::Change - def initialize(*args); end - - def <=>(other); end - def ==(other); end - def new_element; end - def new_position; end - def old_element; end - def old_position; end - def to_a; end - def to_ary; end - - class << self - def from_a(arr); end - def simplify(event); end - end -end - -class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks - def change(event); end - def discard_a(event); end - def discard_b(event); end -end - -class Diff::LCS::DefaultCallbacks - class << self - def change(event); end - def discard_a(event); end - def discard_b(event); end - def match(event); end - end -end - -class Diff::LCS::DiffCallbacks - def initialize; end - - def diffs; end - def discard_a(event); end - def discard_b(event); end - def finish; end - def match(_event); end - - private - - def finish_hunk; end -end - -class Diff::LCS::Hunk - def initialize(data_old, data_new, piece, flag_context, file_length_difference); end - - def blocks; end - def diff(format, last = T.unsafe(nil)); end - def end_new; end - def end_old; end - def file_length_difference; end - def flag_context; end - def flag_context=(context); end - def merge(hunk); end - def missing_last_newline?(data); end - def overlaps?(hunk); end - def start_new; end - def start_old; end - def unshift(hunk); end - - private - - def context_diff(last = T.unsafe(nil)); end - def context_range(mode, op, last = T.unsafe(nil)); end - def ed_diff(format, _last = T.unsafe(nil)); end - def encode(literal, target_encoding = T.unsafe(nil)); end - def encode_as(string, *args); end - def old_diff(_last = T.unsafe(nil)); end - def unified_diff(last = T.unsafe(nil)); end - def unified_range(mode, last); end -end - -Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) -Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) - -module Diff::LCS::Internals - class << self - def analyze_patchset(patchset, depth = T.unsafe(nil)); end - def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end - def lcs(a, b); end - - private - - def inverse_vector(a, vector); end - def position_hash(enum, interval); end - def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end - end -end - -class Diff::LCS::SDiffCallbacks - def initialize; end - - def change(event); end - def diffs; end - def discard_a(event); end - def discard_b(event); end - def match(event); end -end - -Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks -Diff::LCS::VERSION = T.let(T.unsafe(nil), String) - -class Integer < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Integer -end diff --git a/sorbet/rbi/gems/docile@1.4.0.rbi b/sorbet/rbi/gems/docile@1.4.0.rbi deleted file mode 100644 index 73df6db5..00000000 --- a/sorbet/rbi/gems/docile@1.4.0.rbi +++ /dev/null @@ -1,54 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `docile` gem. -# Please instead update this file by running `bin/tapioca gem docile`. - -module Docile - extend ::Docile::Execution - - private - - def dsl_eval(dsl, *args, **_arg2_arg2, &block); end - def dsl_eval_immutable(dsl, *args, **_arg2_arg2, &block); end - def dsl_eval_with_block_return(dsl, *args, **_arg2_arg2, &block); end - - class << self - def dsl_eval(dsl, *args, **_arg2_arg2, &block); end - def dsl_eval_immutable(dsl, *args, **_arg2_arg2, &block); end - def dsl_eval_with_block_return(dsl, *args, **_arg2_arg2, &block); end - end -end - -module Docile::BacktraceFilter - def backtrace; end - def backtrace_locations; end -end - -Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp) - -class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy - def method_missing(method, *args, **_arg2_arg2, &block); end -end - -module Docile::Execution - private - - def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3_arg3, &block); end - - class << self - def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3_arg3, &block); end - end -end - -class Docile::FallbackContextProxy - def initialize(receiver, fallback); end - - def instance_variables; end - def method_missing(method, *args, **_arg2_arg2, &block); end -end - -Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set) -Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set) -Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set) -Docile::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/docile@1.4.1.rbi b/sorbet/rbi/gems/docile@1.4.1.rbi new file mode 100644 index 00000000..091d1b11 --- /dev/null +++ b/sorbet/rbi/gems/docile@1.4.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `docile` gem. +# Please instead update this file by running `bin/tapioca gem docile`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/drb@2.2.3.rbi b/sorbet/rbi/gems/drb@2.2.3.rbi new file mode 100644 index 00000000..3fbcb0f1 --- /dev/null +++ b/sorbet/rbi/gems/drb@2.2.3.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `drb` gem. +# Please instead update this file by running `bin/tapioca gem drb`. + + +# 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.13.1.rbi b/sorbet/rbi/gems/erubi@1.13.1.rbi new file mode 100644 index 00000000..c8989aea --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.13.1.rbi @@ -0,0 +1,155 @@ +# 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`. + + +# pkg:gem/erubi#lib/erubi.rb:3 +module Erubi + private + + # Escape characters with their HTML/XML equivalents. + # + # pkg:gem/erubi#lib/erubi.rb:22 + def h(_arg0); end + + class << self + # Escape characters with their HTML/XML equivalents. + # + # pkg:gem/erubi#lib/erubi.rb:49 + def h(_arg0); end + end +end + +# pkg:gem/erubi#lib/erubi.rb:51 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # pkg:gem/erubi#lib/erubi.rb:91 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # pkg:gem/erubi#lib/erubi.rb:62 + def bufvar; end + + # The filename of the template, if one was given. + # + # pkg:gem/erubi#lib/erubi.rb:59 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # pkg:gem/erubi#lib/erubi.rb:56 + def src; end + + private + + # pkg:gem/erubi#lib/erubi.rb:209 + def _dup_string_if_frozen(string); end + + # Add ruby code to the template + # + # pkg:gem/erubi#lib/erubi.rb:232 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # pkg:gem/erubi#lib/erubi.rb:241 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # pkg:gem/erubi#lib/erubi.rb:250 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # pkg:gem/erubi#lib/erubi.rb:255 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # pkg:gem/erubi#lib/erubi.rb:261 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # pkg:gem/erubi#lib/erubi.rb:222 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # pkg:gem/erubi#lib/erubi.rb:267 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # pkg:gem/erubi#lib/erubi.rb:295 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # pkg:gem/erubi#lib/erubi.rb:277 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# pkg:gem/erubi#lib/erubi.rb:53 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/erubi#lib/erubi.rb:17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/erubi#lib/erubi.rb:15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/erubi#lib/erubi.rb:8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# pkg:gem/erubi#lib/erubi.rb:9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# pkg:gem/erubi#lib/erubi.rb:16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/erubi#lib/erubi.rb:4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/io-console@0.8.2.rbi b/sorbet/rbi/gems/io-console@0.8.2.rbi new file mode 100644 index 00000000..73616ab0 --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.8.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/json@2.19.8.rbi b/sorbet/rbi/gems/json@2.19.8.rbi new file mode 100644 index 00000000..3c905f6d --- /dev/null +++ b/sorbet/rbi/gems/json@2.19.8.rbi @@ -0,0 +1,2240 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# \JSON is easy for us humans to read and write, +# and equally simple for machines to read (parse) and write (generate). +# +# \JSON is language-independent, making it an ideal interchange format +# for applications in differing programming languages +# and on differing operating systems. +# +# == \JSON Values +# +# 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_duplicate_key+ specifies whether duplicate keys in objects +# should be ignored or cause an error to be raised: +# +# When not specified: +# # The last value is used and a deprecation warning emitted. +# JSON.parse('{"a": 1, "a":2}') => {"a" => 2} +# # warning: detected duplicate keys in JSON object. +# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true` +# +# When set to `+true+` +# # The last value is used. +# JSON.parse('{"a": 1, "a":2}') => {"a" => 2} +# +# When set to `+false+`, the future default: +# JSON.parse('{"a": 1, "a":2}') => duplicate key at line 1 column 1 (JSON::ParserError) +# +# --- +# +# 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] +# +# --- +# +# Option +allow_trailing_comma+ (boolean) specifies whether to allow +# trailing commas in objects and arrays; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse('[1,]') # unexpected character: ']' at line 1 column 4 (JSON::ParserError) +# +# When enabled: +# JSON.parse('[1,]', allow_trailing_comma: true) # => [1] +# +# --- +# +# Option +allow_control_characters+ (boolean) specifies whether to allow +# unescaped ASCII control characters, such as newlines, in strings; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse(%{"Hello\nWorld"}) # invalid ASCII control character in string (JSON::ParserError) +# +# When enabled: +# JSON.parse(%{"Hello\nWorld"}, allow_control_characters: true) # => "Hello\nWorld" +# +# --- +# +# Option +allow_invalid_escape+ (boolean) specifies whether to ignore backslahes that are followed +# by an invalid escape character in strings; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse('"Hell\o"') # invalid escape character in string (JSON::ParserError) +# +# When enabled: +# JSON.parse('"Hell\o"', allow_invalid_escape: true) # => "Hello" +# +# ====== Output Options +# +# Option +freeze+ (boolean) specifies whether the returned objects will be frozen; +# defaults to +false+. +# +# 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, JSON::NaN, JSON::Infinity, JSON::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,NaN,Infinity,-Infinity]' +# +# --- +# +# Option +allow_duplicate_key+ (boolean) specifies whether +# hashes with duplicate keys should be allowed or produce an error. +# defaults to emit a deprecation warning. +# +# With the default, (not set): +# Warning[:deprecated] = true +# JSON.generate({ foo: 1, "foo" => 2 }) +# # warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}. +# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true` +# # => '{"foo":1,"foo":2}' +# +# With false +# JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false) +# # detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError) +# +# In version 3.0, false will become the default. +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Escaping Options +# +# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029' +# and '/' should be escaped as to make the JSON object safe to interpolate in script +# tags. +# +# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range +# should be escaped. +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# Note that JSON Additions must only be used with trusted data, and is +# deprecated. +# +# 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 = <<~EOT +# Generated JSON: +# Without addition: #{json0} (#{json0.class}) +# With addition: #{json1} (#{json1.class}) +# Parsed JSON: +# Without addition: #{ruby0.inspect} (#{ruby0.class}) +# With addition: #{ruby1.inspect} (#{ruby1.class}) +# EOT +# puts display +# +# This output shows the different results: +# Generated JSON: +# Without addition: "0..2" (String) +# With addition: {"json_class":"Range","a":[0,2,false]} (String) +# Parsed JSON: +# Without addition: "0..2" (String) +# With addition: 0..2 (Range) +# +# The \JSON module includes additions for certain classes. +# You can also craft custom additions. +# See {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions]. +# +# === Built-in Additions +# +# The \JSON module includes additions for certain classes. +# To use an addition, +require+ its source: +# - BigDecimal: 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 = <<~EOT +# Generated JSON: +# Without custom addition: #{json0} (#{json0.class}) +# With custom addition: #{json1} (#{json1.class}) +# Parsed JSON: +# Without custom addition: #{obj0.inspect} (#{obj0.class}) +# With custom addition: #{obj1.inspect} (#{obj1.class}) +# EOT +# puts display +# +# Output: +# +# Generated JSON: +# Without custom addition: "#" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +# +# pkg:gem/json#lib/json/version.rb:3 +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"} + # + # pkg:gem/json#lib/json/common.rb:932 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # pkg:gem/json#lib/json/common.rb:462 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:977 + def fast_unparse(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also 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) + # + # pkg:gem/json#lib/json/common.rb:441 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, options = {}) -> object + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # 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. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # + # Since JSON version 2.8.0, `load` emits a deprecation warning when a + # non native type is deserialized, without `create_additions` being explicitly + # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled + # by default. + # + # - 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. + # - 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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # 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 + # obj + # }) + # 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"}>} + # + # pkg:gem/json#lib/json/common.rb:856 + 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. + # + # pkg:gem/json#lib/json/common.rb:390 + 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! + # + # pkg:gem/json#lib/json/common.rb:401 + 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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # 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('') + # + # pkg:gem/json#lib/json/common.rb:353 + 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+. + # + # pkg:gem/json#lib/json/common.rb:375 + 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 + # } + # } + # + # pkg:gem/json#lib/json/common.rb:509 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:987 + def pretty_unparse(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/json#lib/json/common.rb:997 + def restore(*_arg0, **_arg1, &_arg2); end + + # :stopdoc: + # All these were meant to be deprecated circa 2009, but were just set as undocumented + # so usage still exist in the wild. + # + # pkg:gem/json#lib/json/common.rb:967 + def unparse(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # JSON.unsafe_load(source, options = {}) -> object + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # 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 +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. + # - 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.unsafe_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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_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.unsafe_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.unsafe_load + # ruby = JSON.unsafe_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 + # obj + # }) + # 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"}>} + # + # pkg:gem/json#lib/json/common.rb:685 + def unsafe_load(source, proc = T.unsafe(nil), options = 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]' + # + # pkg:gem/json#lib/json/common.rb:132 + def [](object, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:208 + def _dump_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def _load_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def _unsafe_load_default_options; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # pkg:gem/json#lib/json/common.rb:236 + 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' + # + # pkg:gem/json#lib/json/common.rb:230 + def create_id=(new_value); end + + # pkg:gem/json#lib/json/common.rb:104 + def deprecation_warning(message, uplevel = T.unsafe(nil)); 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"} + # + # pkg:gem/json#lib/json/common.rb:932 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:208 + def dump_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def dump_default_options=(val); 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) + # + # pkg:gem/json#lib/json/common.rb:462 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:977 + def fast_unparse(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also 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) + # + # pkg:gem/json#lib/json/common.rb:441 + def generate(obj, opts = T.unsafe(nil)); end + + # Returns the JSON generator module that is used by JSON. + # + # pkg:gem/json#lib/json/common.rb:179 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # pkg:gem/json#lib/json/common.rb:156 + def generator=(generator); end + + # :call-seq: + # JSON.load(source, options = {}) -> object + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # 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. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # + # Since JSON version 2.8.0, `load` emits a deprecation warning when a + # non native type is deserialized, without `create_additions` being explicitly + # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled + # by default. + # + # - 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. + # - 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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # 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 + # obj + # }) + # 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"}>} + # + # pkg:gem/json#lib/json/common.rb:856 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:208 + def load_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def load_default_options=(val); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # pkg:gem/json#lib/json/common.rb:390 + 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! + # + # pkg:gem/json#lib/json/common.rb:401 + 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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # 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('') + # + # pkg:gem/json#lib/json/common.rb:353 + 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+. + # + # pkg:gem/json#lib/json/common.rb:375 + def parse!(source, opts = T.unsafe(nil)); end + + # Returns the JSON parser class that is used by JSON. + # + # pkg:gem/json#lib/json/common.rb:146 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # pkg:gem/json#lib/json/common.rb:149 + 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 + # } + # } + # + # pkg:gem/json#lib/json/common.rb:509 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:987 + def pretty_unparse(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/json#lib/json/common.rb:997 + def restore(*_arg0, **_arg1, &_arg2); end + + # Sets or Returns the JSON generator state class that is used by JSON. + # + # pkg:gem/json#lib/json/common.rb:182 + def state; end + + # Sets or Returns the JSON generator state class that is used by JSON. + # + # pkg:gem/json#lib/json/common.rb:182 + def state=(_arg0); end + + # :stopdoc: + # All these were meant to be deprecated circa 2009, but were just set as undocumented + # so usage still exist in the wild. + # + # pkg:gem/json#lib/json/common.rb:967 + def unparse(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # JSON.unsafe_load(source, options = {}) -> object + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # 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 +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. + # - 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.unsafe_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 = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_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.unsafe_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.unsafe_load + # ruby = JSON.unsafe_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 + # obj + # }) + # 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"}>} + # + # pkg:gem/json#lib/json/common.rb:685 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:208 + def unsafe_load_default_options; end + + # pkg:gem/json#lib/json/common.rb:208 + def unsafe_load_default_options=(val); end + + private + + # pkg:gem/json#lib/json/common.rb:1010 + def const_missing(const_name); end + + # pkg:gem/json#lib/json/common.rb:205 + def deprecated_singleton_attr_accessor(*attrs); end + + # Called from the extension when a hash has both string and symbol keys + # + # pkg:gem/json#lib/json/common.rb:187 + def on_mixed_keys_hash(hash, do_raise); end + end +end + +# JSON::Coder holds a parser and generator configuration. +# +# module MyApp +# JSONC_CODER = JSON::Coder.new( +# allow_trailing_comma: true +# ) +# end +# +# MyApp::JSONC_CODER.load(document) +# +# pkg:gem/json#lib/json/common.rb:1036 +class JSON::Coder + # :call-seq: + # JSON.new(options = nil, &block) + # + # Argument +options+, if given, contains a \Hash of options for both parsing and generating. + # See {Parsing Options}[rdoc-ref:JSON@Parsing+Options], + # and {Generating Options}[rdoc-ref:JSON@Generating+Options]. + # + # For generation, the strict: true option is always set. When a Ruby object with no native \JSON counterpart is + # encountered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native + # \JSON counterpart: + # + # module MyApp + # API_JSON_CODER = JSON::Coder.new do |object| + # case object + # when Time + # object.iso8601(3) + # else + # object # Unknown type, will raise + # end + # end + # end + # + # puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z" + # + # pkg:gem/json#lib/json/common.rb:1061 + def initialize(options = T.unsafe(nil), &as_json); end + + # call-seq: + # dump(object) -> String + # dump(object, io) -> io + # + # Serialize the given object into a \JSON document. + # + # pkg:gem/json#lib/json/common.rb:1079 + def dump(object, io = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:1082 + def generate(object, io = T.unsafe(nil)); end + + # call-seq: + # load(string) -> Object + # + # Parse the given \JSON document and return an equivalent Ruby object. + # + # pkg:gem/json#lib/json/common.rb:1088 + def load(source); end + + # call-seq: + # load(path) -> Object + # + # Parse the given \JSON document and return an equivalent Ruby object. + # + # pkg:gem/json#lib/json/common.rb:1097 + def load_file(path); end + + # pkg:gem/json#lib/json/common.rb:1091 + def parse(source); end +end + +# pkg:gem/json#lib/json/ext.rb:39 +class JSON::Ext::Generator::State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[rdoc-ref:JSON@Generating+Options]. + # + # pkg:gem/json#lib/json/ext.rb:39 + def initialize(opts = T.unsafe(nil)); end + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:77 + def [](name); end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:91 + def []=(name, value); end + + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(*_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def allow_nan=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def allow_nan?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def array_nl; end + + # pkg:gem/json#lib/json/ext.rb:39 + def array_nl=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def as_json; end + + # pkg:gem/json#lib/json/ext.rb:39 + def as_json=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def ascii_only=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def ascii_only?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def buffer_initial_length; end + + # pkg:gem/json#lib/json/ext.rb:39 + def buffer_initial_length=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def check_circular?; end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:23 + def configure(opts); end + + # pkg:gem/json#lib/json/ext.rb:39 + def depth; end + + # pkg:gem/json#lib/json/ext.rb:39 + def depth=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash; end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def escape_slash?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def generate(*_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def indent; end + + # pkg:gem/json#lib/json/ext.rb:39 + def indent=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def max_nesting; end + + # pkg:gem/json#lib/json/ext.rb:39 + def max_nesting=(_arg0); end + + # pkg:gem/json#lib/json/ext/generator/state.rb:36 + def merge(opts); end + + # pkg:gem/json#lib/json/ext.rb:39 + def object_nl; end + + # pkg:gem/json#lib/json/ext.rb:39 + def object_nl=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe; end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def script_safe?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def space_before; end + + # pkg:gem/json#lib/json/ext.rb:39 + def space_before=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict; end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict=(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def strict?; end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # pkg:gem/json#lib/json/ext/generator/state.rb:42 + def to_h; end + + # pkg:gem/json#lib/json/ext/generator/state.rb:72 + def to_hash; end + + private + + # pkg:gem/json#lib/json/ext.rb:39 + def _configure(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def allow_duplicate_key?; end + + # pkg:gem/json#lib/json/ext.rb:39 + def initialize_copy(_arg0); end + + class << self + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(_arg0, _arg1, _arg2); end + + # pkg:gem/json#lib/json/ext.rb:39 + def from_state(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:39 + def generate(_arg0, _arg1, _arg2); end + end +end + +# pkg:gem/json#lib/json/ext.rb:9 +class JSON::Ext::Parser + # pkg:gem/json#lib/json/ext.rb:17 + def initialize(source, opts = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/ext.rb:26 + def parse; end + + # pkg:gem/json#lib/json/ext.rb:22 + def source; end + + class << self + # pkg:gem/json#lib/json/ext.rb:11 + def parse(_arg0, _arg1); end + end +end + +# pkg:gem/json#lib/json/ext.rb:32 +JSON::Ext::Parser::Config = JSON::Ext::ParserConfig + +# pkg:gem/json#lib/json/ext.rb:31 +class JSON::Ext::ParserConfig + # pkg:gem/json#lib/json/ext.rb:31 + def initialize(_arg0); end + + # pkg:gem/json#lib/json/ext.rb:31 + def parse(_arg0); end +end + +# Fragment of JSON document that is to be included as is: +# fragment = JSON::Fragment.new("[1, 2, 3]") +# JSON.generate({ count: 3, items: fragments }) +# +# This allows to easily assemble multiple JSON fragments that have +# been persisted somewhere without having to parse them nor resorting +# to string interpolation. +# +# Note: no validation is performed on the provided string. It is the +# responsibility of the caller to ensure the string contains valid JSON. +# +# pkg:gem/json#lib/json/common.rb:289 +class JSON::Fragment < ::Struct + # pkg:gem/json#lib/json/common.rb:290 + def initialize(json); end + + # pkg:gem/json#lib/json/common.rb:289 + def json; end + + # pkg:gem/json#lib/json/common.rb:289 + def json=(_); end + + # pkg:gem/json#lib/json/common.rb:298 + def to_json(state = T.unsafe(nil), *_arg1); end + + class << self + # pkg:gem/json#lib/json/common.rb:289 + def [](*_arg0); end + + # pkg:gem/json#lib/json/common.rb:289 + def inspect; end + + # pkg:gem/json#lib/json/common.rb:289 + def keyword_init?; end + + # pkg:gem/json#lib/json/common.rb:289 + def members; end + + # pkg:gem/json#lib/json/common.rb:289 + def new(*_arg0); end + end +end + +# This exception is raised if a generator or unparser error occurs. +# +# pkg:gem/json#lib/json/common.rb:259 +class JSON::GeneratorError < ::JSON::JSONError + # pkg:gem/json#lib/json/common.rb:262 + def initialize(message, invalid_object = T.unsafe(nil)); end + + # pkg:gem/json#lib/json/common.rb:267 + def detailed_message(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/json#lib/json/common.rb:260 + def invalid_object; end +end + +# pkg:gem/json#lib/json/common.rb:1102 +module JSON::GeneratorMethods + # call-seq: to_json(*) + # + # Converts this object into a JSON string. + # If this object doesn't directly maps to a JSON native type, + # first convert it to a string (calling #to_s), then converts + # it to a JSON string, and returns the result. + # This is a fallback, if no special method #to_json was defined for some object. + # + # pkg:gem/json#lib/json/common.rb:1110 + def to_json(state = T.unsafe(nil), *_arg1); end +end + +# pkg:gem/json#lib/json/generic_object.rb:9 +class JSON::GenericObject < ::OpenStruct + # pkg:gem/json#lib/json/generic_object.rb:59 + def as_json(*_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:51 + def to_hash; end + + # pkg:gem/json#lib/json/generic_object.rb:63 + def to_json(*a); end + + # pkg:gem/json#lib/json/generic_object.rb:55 + def |(other); end + + class << self + # pkg:gem/json#lib/json/generic_object.rb:11 + def [](*_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:45 + def dump(obj, *args); end + + # pkg:gem/json#lib/json/generic_object.rb:25 + def from_hash(object); end + + # pkg:gem/json#lib/json/generic_object.rb:17 + def json_creatable=(_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:13 + def json_creatable?; end + + # pkg:gem/json#lib/json/generic_object.rb:19 + def json_create(data); end + + # pkg:gem/json#lib/json/generic_object.rb:40 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# pkg:gem/json#lib/json/common.rb:358 +JSON::PARSE_L_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/json#lib/json/common.rb:471 +JSON::PRETTY_GENERATE_OPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/json#lib/json/common.rb:152 +JSON::Parser = JSON::Ext::Parser + +# This exception is raised if a parser error occurs. +# +# pkg:gem/json#lib/json/common.rb:250 +class JSON::ParserError < ::JSON::JSONError + # pkg:gem/json#lib/json/common.rb:251 + def column; end + + # pkg:gem/json#lib/json/common.rb:251 + def line; end +end + +# pkg:gem/json#lib/json/common.rb:8 +module JSON::ParserOptions + class << self + # pkg:gem/json#lib/json/common.rb:10 + def prepare(opts); end + + private + + # pkg:gem/json#lib/json/common.rb:40 + def array_class_proc(array_class, on_load); end + + # TODO: extract :create_additions support to another gem for version 3.0 + # + # pkg:gem/json#lib/json/common.rb:52 + def create_additions_proc(opts); end + + # pkg:gem/json#lib/json/common.rb:95 + def create_additions_warning; end + + # pkg:gem/json#lib/json/common.rb:29 + def object_class_proc(object_class, on_load); end + end +end + +# pkg:gem/json#lib/json/common.rb:173 +JSON::State = JSON::Ext::Generator::State + +# pkg:gem/json#lib/json/common.rb:1127 +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. + # + # pkg:gem/json#lib/json/common.rb:1166 + def JSON(object, opts = T.unsafe(nil)); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # pkg:gem/json#lib/json/common.rb:1132 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # pkg:gem/json#lib/json/common.rb:1147 + def jj(*objs); end +end + +# pkg:gem/json#lib/json/common.rb:1171 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + include ::JSON::GeneratorMethods +end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi new file mode 100644 index 00000000..5f91e74f --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi new file mode 100644 index 00000000..e9a2303d --- /dev/null +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `lint_roller` gem. +# Please instead update this file by running `bin/tapioca gem lint_roller`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/logger@1.7.0.rbi b/sorbet/rbi/gems/logger@1.7.0.rbi new file mode 100644 index 00000000..b6268d3b --- /dev/null +++ b/sorbet/rbi/gems/logger@1.7.0.rbi @@ -0,0 +1,896 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `logger` gem. +# Please instead update this file by running `bin/tapioca gem logger`. + + +# \Class \Logger provides a simple but sophisticated logging utility that +# you can use to create one or more +# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs] +# for your program. +# Each such log contains a chronological sequence of entries +# that provides a record of the program's activities. +# +# == About the Examples +# +# All examples on this page assume that \Logger has been required: +# +# require 'logger' +# +# == Synopsis +# +# Create a log with Logger.new: +# +# # Single log file. +# logger = Logger.new('t.log') +# # Size-based rotated logging: 3 10-megabyte files. +# logger = Logger.new('t.log', 3, 10485760) +# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly'). +# logger = Logger.new('t.log', 'daily') +# # Log to an IO stream. +# logger = Logger.new($stdout) +# +# Add entries (level, message) with Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# Close the log with Logger#close: +# +# logger.close +# +# == Entries +# +# You can add entries with method Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# These shorthand methods also add entries: +# +# logger.debug('Maximal debugging info') +# logger.info('Non-error information') +# logger.warn('Non-error warning') +# logger.error('Non-fatal error') +# logger.fatal('Fatal error') +# logger.unknown('Most severe') +# +# When you call any of these methods, +# the entry may or may not be written to the log, +# depending on the entry's severity and on the log level; +# see {Log Level}[rdoc-ref:Logger@Log+Level] +# +# An entry always has: +# +# - A severity (the required argument to #add). +# - An automatically created timestamp. +# +# And may also have: +# +# - A message. +# - A program name. +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message.', 'mung') +# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message. +# +# The default format for an entry is: +# +# "%s, [%s #%d] %5s -- %s: %s\n" +# +# where the values to be formatted are: +# +# - \Severity (one letter). +# - Timestamp. +# - Process id. +# - \Severity (word). +# - Program name. +# - Message. +# +# You can use a different entry format by: +# +# - Setting a custom format proc (affects following entries); +# see {formatter=}[Logger.html#attribute-i-formatter]. +# - Calling any of the methods above with a block +# (affects only the one entry). +# Doing so can have two benefits: +# +# - Context: the block can evaluate the entire program context +# and create a context-dependent message. +# - Performance: the block is not evaluated unless the log level +# permits the entry actually to be written: +# +# logger.error { my_slow_message_generator } +# +# Contrast this with the string form, where the string is +# always evaluated, regardless of the log level: +# +# logger.error("#{my_slow_message_generator}") +# +# === \Severity +# +# The severity of a log entry has two effects: +# +# - Determines whether the entry is selected for inclusion in the log; +# see {Log Level}[rdoc-ref:Logger@Log+Level]. +# - Indicates to any log reader (whether a person or a program) +# the relative importance of the entry. +# +# === Timestamp +# +# The timestamp for a log entry is generated automatically +# when the entry is created. +# +# The logged timestamp is formatted by method +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime] +# using this format string: +# +# '%Y-%m-%dT%H:%M:%S.%6N' +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO) +# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil +# +# You can set a different format using method #datetime_format=. +# +# === Message +# +# The message is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message') +# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message +# +# For the default entry formatter, Logger::Formatter, +# the message object may be: +# +# - A string: used as-is. +# - An Exception: message.message is used. +# - Anything else: message.inspect is used. +# +# *Note*: Logger::Formatter does not escape or sanitize +# the message passed to it. +# Developers should be aware that malicious data (user input) +# may be in the message, and should explicitly escape untrusted data. +# +# You can use a custom formatter to escape message data; +# see the example at {formatter=}[Logger.html#attribute-i-formatter]. +# +# === Program Name +# +# The program name is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message', 'mung') +# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message +# +# The default program name for a new logger may be set in the call to +# Logger.new via optional keyword argument +progname+: +# +# logger = Logger.new('t.log', progname: 'mung') +# +# The default program name for an existing logger may be set +# by a call to method #progname=: +# +# logger.progname = 'mung' +# +# The current program name may be retrieved with method +# {progname}[Logger.html#attribute-i-progname]: +# +# logger.progname # => "mung" +# +# == Log Level +# +# The log level setting determines whether an entry is actually +# written to the log, based on the entry's severity. +# +# These are the defined severities (least severe to most severe): +# +# logger = Logger.new($stdout) +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info +# logger.add(Logger::INFO, 'Non-error information') +# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information +# logger.add(Logger::WARN, 'Non-error warning') +# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning +# logger.add(Logger::ERROR, 'Non-fatal error') +# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error +# logger.add(Logger::FATAL, 'Fatal error') +# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error +# logger.add(Logger::UNKNOWN, 'Most severe') +# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe +# +# The default initial level setting is Logger::DEBUG, the lowest level, +# which means that all entries are to be written, regardless of severity: +# +# logger = Logger.new($stdout) +# logger.level # => 0 +# logger.add(0, "My message") +# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message +# +# You can specify a different setting in a new logger +# using keyword argument +level+ with an appropriate value: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger = Logger.new($stdout, level: 'error') +# logger = Logger.new($stdout, level: :error) +# logger.level # => 3 +# +# With this level, entries with severity Logger::ERROR and higher +# are written, while those with lower severities are not written: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger.add(3) +# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil +# logger.add(2) # Silent. +# +# You can set the log level for an existing logger +# with method #level=: +# +# logger.level = Logger::ERROR +# +# These shorthand methods also set the level: +# +# logger.debug! # => 0 +# logger.info! # => 1 +# logger.warn! # => 2 +# logger.error! # => 3 +# logger.fatal! # => 4 +# +# You can retrieve the log level with method #level. +# +# logger.level = Logger::ERROR +# logger.level # => 3 +# +# These methods return whether a given +# level is to be written: +# +# logger.level = Logger::ERROR +# logger.debug? # => false +# logger.info? # => false +# logger.warn? # => false +# logger.error? # => true +# logger.fatal? # => true +# +# == Log File Rotation +# +# By default, a log file is a single file that grows indefinitely +# (until explicitly closed); there is no file rotation. +# +# To keep log files to a manageable size, +# you can use _log_ _file_ _rotation_, which uses multiple log files: +# +# - Each log file has entries for a non-overlapping +# time interval. +# - Only the most recent log file is open and active; +# the others are closed and inactive. +# +# === Size-Based Rotation +# +# For size-based log file rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ with a positive integer: +# the number of log files to be in the rotation. +# - Argument +shift_size+ as a positive integer: +# the maximum size (in bytes) of each log file; +# defaults to 1048576 (1 megabyte). +# +# Examples: +# +# logger = Logger.new('t.log', 3) # Three 1-megabyte files. +# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files. +# +# For these examples, suppose: +# +# logger = Logger.new('t.log', 3) +# +# Logging begins in the new log file, +t.log+; +# the log file is "full" and ready for rotation +# when a new entry would cause its size to exceed +shift_size+. +# +# The first time +t.log+ is full: +# +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# The second time +t.log+ is full: +# +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# Each subsequent time that +t.log+ is full, +# the log files are rotated: +# +# - +t.log.1+ is removed. +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# === Periodic Rotation +# +# For periodic rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ as a string period indicator. +# +# Examples: +# +# logger = Logger.new('t.log', 'daily') # Rotate log files daily. +# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly. +# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly. +# +# Example: +# +# logger = Logger.new('t.log', 'daily') +# +# When the given period expires: +# +# - The base log file, +t.log+ is closed and renamed +# with a date-based suffix such as +t.log.20220509+. +# - A new log file +t.log+ is opened. +# - Nothing is removed. +# +# The default format for the suffix is '%Y%m%d', +# which produces a suffix similar to the one above. +# You can set a different format using create-time option +# +shift_period_suffix+; +# see details and suggestions at +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. +# +# pkg:gem/logger#lib/logger/version.rb:3 +class Logger + include ::Logger::Severity + + # :call-seq: + # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options) + # + # With the single argument +logdev+, + # returns a new logger with all default options: + # + # Logger.new('t.log') # => # + # + # Argument +logdev+ must be one of: + # + # - A string filepath: entries are to be written + # to the file at that path; if the file at that path exists, + # new entries are appended. + # - An IO stream (typically $stdout, $stderr. or + # an open file): entries are to be written to the given stream. + # - +nil+ or +File::NULL+: no entries are to be written. + # + # Argument +shift_age+ must be one of: + # + # - The number of log files to be in the rotation. + # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation]. + # - A string period indicator. + # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # + # Argument +shift_size+ is the maximum size (in bytes) of each log file. + # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation]. + # + # Examples: + # + # Logger.new('t.log') + # Logger.new($stdout) + # + # The keyword options are: + # + # - +level+: sets the log level; default value is Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]: + # + # Logger.new('t.log', level: Logger::ERROR) + # + # - +progname+: sets the default program name; default is +nil+. + # See {Program Name}[rdoc-ref:Logger@Program+Name]: + # + # Logger.new('t.log', progname: 'mung') + # + # - +formatter+: sets the entry formatter; default is +nil+. + # See {formatter=}[Logger.html#attribute-i-formatter]. + # + # - +datetime_format+: sets the format for entry timestamp; + # default is +nil+. + # See #datetime_format=. + # + # - +binmode+: sets whether the logger writes in binary mode; + # default is +false+. + # + # - +shift_period_suffix+: sets the format for the filename suffix + # for periodic log file rotation; default is '%Y%m%d'. + # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # + # - +reraise_write_errors+: An array of exception classes, which will + # be reraised if there is an error when writing to the log device. + # The default is to swallow all exceptions raised. + # - +skip_header+: If +true+, prevents the logger from writing a header + # when creating a new log file. The default is +false+, meaning + # the header will be written as usual. + # + # pkg:gem/logger#lib/logger.rb:598 + def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end + + # Writes the given +msg+ to the log with no formatting; + # returns the number of characters written, + # or +nil+ if no log device exists: + # + # logger = Logger.new($stdout) + # logger << 'My message.' # => 10 + # + # Output: + # + # My message. + # + # pkg:gem/logger#lib/logger.rb:708 + def <<(msg); end + + # Creates a log entry, which may or may not be written to the log, + # depending on the entry's severity and on the log level. + # See {Log Level}[rdoc-ref:Logger@Log+Level] + # and {Entries}[rdoc-ref:Logger@Entries] for details. + # + # Examples: + # + # logger = Logger.new($stdout, progname: 'mung') + # logger.add(Logger::INFO) + # logger.add(Logger::ERROR, 'No good') + # logger.add(Logger::ERROR, 'No good', 'gnum') + # + # Output: + # + # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung + # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good + # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good + # + # These convenience methods have implicit severity: + # + # - #debug. + # - #info. + # - #warn. + # - #error. + # - #fatal. + # - #unknown. + # + # pkg:gem/logger#lib/logger.rb:675 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Closes the logger; returns +nil+: + # + # logger = Logger.new('t.log') + # logger.close # => nil + # logger.info('foo') # Prints "log writing failed. closed stream" + # + # Related: Logger#reopen. + # + # pkg:gem/logger#lib/logger.rb:755 + def close; end + + # Returns the date-time format; see #datetime_format=. + # + # pkg:gem/logger#lib/logger.rb:438 + def datetime_format; end + + # Sets the date-time format. + # + # Argument +datetime_format+ should be either of these: + # + # - A string suitable for use as a format for method + # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. + # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'. + # + # pkg:gem/logger#lib/logger.rb:432 + def datetime_format=(datetime_format); end + + # Equivalent to calling #add with severity Logger::DEBUG. + # + # pkg:gem/logger#lib/logger.rb:714 + def debug(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:487 + def debug!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::DEBUG to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:482 + def debug?; end + + # Equivalent to calling #add with severity Logger::ERROR. + # + # pkg:gem/logger#lib/logger.rb:732 + def error(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::ERROR. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:520 + def error!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::ERROR to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:515 + def error?; end + + # Equivalent to calling #add with severity Logger::FATAL. + # + # pkg:gem/logger#lib/logger.rb:738 + def fatal(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::FATAL. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:531 + def fatal!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::FATAL to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:526 + def fatal?; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # pkg:gem/logger#lib/logger.rb:473 + def formatter; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # pkg:gem/logger#lib/logger.rb:473 + def formatter=(_arg0); end + + # Equivalent to calling #add with severity Logger::INFO. + # + # pkg:gem/logger#lib/logger.rb:720 + def info(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::INFO. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:498 + def info!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::INFO to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:493 + def info?; end + + # Logging severity threshold (e.g. Logger::INFO). + # + # pkg:gem/logger#lib/logger.rb:383 + def level; end + + # Sets the log level; returns +severity+. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # Argument +severity+ may be an integer, a string, or a symbol: + # + # logger.level = Logger::ERROR # => 3 + # logger.level = 3 # => 3 + # logger.level = 'error' # => "error" + # logger.level = :error # => :error + # + # Logger#sev_threshold= is an alias for Logger#level=. + # + # pkg:gem/logger#lib/logger.rb:399 + def level=(severity); end + + # pkg:gem/logger#lib/logger.rb:695 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Program name to include in log messages. + # + # pkg:gem/logger#lib/logger.rb:422 + def progname; end + + # Program name to include in log messages. + # + # pkg:gem/logger#lib/logger.rb:422 + def progname=(_arg0); end + + # Sets the logger's output stream: + # + # - If +logdev+ is +nil+, reopens the current output stream. + # - If +logdev+ is a filepath, opens the indicated file for append. + # - If +logdev+ is an IO stream + # (usually $stdout, $stderr, or an open File object), + # opens the stream for append. + # + # Example: + # + # logger = Logger.new('t.log') + # logger.add(Logger::ERROR, 'one') + # logger.close + # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream' + # logger.reopen + # logger.add(Logger::ERROR, 'three') + # logger.close + # File.readlines('t.log') + # # => + # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n", + # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", + # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] + # + # pkg:gem/logger#lib/logger.rb:642 + def reopen(logdev = T.unsafe(nil), shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger.rb:475 + def sev_threshold; end + + # pkg:gem/logger#lib/logger.rb:476 + def sev_threshold=(severity); end + + # Equivalent to calling #add with severity Logger::UNKNOWN. + # + # pkg:gem/logger#lib/logger.rb:744 + def unknown(progname = T.unsafe(nil), &block); end + + # Equivalent to calling #add with severity Logger::WARN. + # + # pkg:gem/logger#lib/logger.rb:726 + def warn(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::WARN. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:509 + def warn!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::WARN to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # pkg:gem/logger#lib/logger.rb:504 + def warn?; end + + # Adjust the log level during the block execution for the current Fiber only + # + # logger.with_level(:debug) do + # logger.debug { "Hello" } + # end + # + # pkg:gem/logger#lib/logger.rb:408 + def with_level(severity); end + + private + + # pkg:gem/logger#lib/logger.rb:786 + def format_message(severity, datetime, progname, msg); end + + # pkg:gem/logger#lib/logger.rb:764 + def format_severity(severity); end + + # pkg:gem/logger#lib/logger.rb:782 + def level_key; end + + # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. + # + # pkg:gem/logger#lib/logger.rb:769 + def level_override; end +end + +# Default formatter for log messages. +# +# pkg:gem/logger#lib/logger/formatter.rb:5 +class Logger::Formatter + # pkg:gem/logger#lib/logger/formatter.rb:11 + def initialize; end + + # pkg:gem/logger#lib/logger/formatter.rb:15 + def call(severity, time, progname, msg); end + + # pkg:gem/logger#lib/logger/formatter.rb:9 + def datetime_format; end + + # pkg:gem/logger#lib/logger/formatter.rb:9 + def datetime_format=(_arg0); end + + private + + # pkg:gem/logger#lib/logger/formatter.rb:21 + def format_datetime(time); end + + # pkg:gem/logger#lib/logger/formatter.rb:25 + def msg2str(msg); end +end + +# pkg:gem/logger#lib/logger/formatter.rb:7 +Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String) + +# pkg:gem/logger#lib/logger/formatter.rb:6 +Logger::Formatter::Format = T.let(T.unsafe(nil), String) + +# Device used for logging messages. +# +# pkg:gem/logger#lib/logger/log_device.rb:7 +class Logger::LogDevice + include ::Logger::Period + include ::MonitorMixin + + # pkg:gem/logger#lib/logger/log_device.rb:14 + def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger/log_device.rb:38 + def close; end + + # pkg:gem/logger#lib/logger/log_device.rb:10 + def dev; end + + # pkg:gem/logger#lib/logger/log_device.rb:11 + def filename; end + + # pkg:gem/logger#lib/logger/log_device.rb:48 + def reopen(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end + + # pkg:gem/logger#lib/logger/log_device.rb:27 + def write(message); end + + private + + # pkg:gem/logger#lib/logger/log_device.rb:156 + def add_log_header(file); end + + # pkg:gem/logger#lib/logger/log_device.rb:162 + def check_shift_log; end + + # pkg:gem/logger#lib/logger/log_device.rb:132 + def create_logfile(filename); end + + # pkg:gem/logger#lib/logger/log_device.rb:104 + def fixup_mode(dev); end + + # pkg:gem/logger#lib/logger/log_device.rb:148 + def handle_write_errors(mesg); end + + # pkg:gem/logger#lib/logger/log_device.rb:177 + def lock_shift_log; end + + # pkg:gem/logger#lib/logger/log_device.rb:119 + def open_logfile(filename); end + + # pkg:gem/logger#lib/logger/log_device.rb:78 + def set_dev(log); end + + # pkg:gem/logger#lib/logger/log_device.rb:92 + def set_file(shift_age, shift_size, shift_period_suffix); end + + # pkg:gem/logger#lib/logger/log_device.rb:207 + def shift_log_age; end + + # pkg:gem/logger#lib/logger/log_device.rb:232 + def shift_log_file(shifted); end + + # pkg:gem/logger#lib/logger/log_device.rb:216 + def shift_log_period(period_end); end +end + +# :stopdoc: +# +# pkg:gem/logger#lib/logger/log_device.rb:69 +Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/log_device.rb:76 +Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/log_device.rb:72 +Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/logger#lib/logger/period.rb:4 +module Logger::Period + private + + # pkg:gem/logger#lib/logger/period.rb:9 + def next_rotate_time(now, shift_age); end + + # pkg:gem/logger#lib/logger/period.rb:31 + def previous_period_end(now, shift_age); end + + class << self + # pkg:gem/logger#lib/logger/period.rb:9 + def next_rotate_time(now, shift_age); end + + # pkg:gem/logger#lib/logger/period.rb:31 + def previous_period_end(now, shift_age); end + end +end + +# pkg:gem/logger#lib/logger/period.rb:7 +Logger::Period::SiD = T.let(T.unsafe(nil), Integer) + +# \Severity label for logging (max 5 chars). +# +# pkg:gem/logger#lib/logger.rb:762 +Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) + +# Logging severity. +# +# pkg:gem/logger#lib/logger/severity.rb:5 +module Logger::Severity + class << self + # pkg:gem/logger#lib/logger/severity.rb:29 + def coerce(severity); end + end +end + +# pkg:gem/logger#lib/logger/severity.rb:19 +Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.0.0.rbi deleted file mode 100644 index b7ecbb69..00000000 --- a/sorbet/rbi/gems/method_source@1.0.0.rbi +++ /dev/null @@ -1,72 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `method_source` gem. -# Please instead update this file by running `bin/tapioca gem method_source`. - -module MethodSource - extend ::MethodSource::CodeHelpers - - class << self - def comment_helper(source_location, name = T.unsafe(nil)); end - def extract_code(source_location); end - def lines_for(file_name, name = T.unsafe(nil)); end - def source_helper(source_location, name = T.unsafe(nil)); end - def valid_expression?(str); end - end -end - -module MethodSource::CodeHelpers - def comment_describing(file, line_number); end - def complete_expression?(str); end - def expression_at(file, line_number, options = T.unsafe(nil)); end - - private - - def extract_first_expression(lines, consume = T.unsafe(nil), &block); end - def extract_last_comment(lines); end -end - -module MethodSource::CodeHelpers::IncompleteExpression - class << self - def ===(ex); end - def rbx?; end - end -end - -MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) -MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) - -module MethodSource::MethodExtensions - def comment; end - def source; end - - class << self - def included(klass); end - end -end - -module MethodSource::ReeSourceLocation - def source_location; end -end - -module MethodSource::SourceLocation; end - -module MethodSource::SourceLocation::MethodExtensions - def source_location; end - - private - - def trace_func(event, file, line, id, binding, classname); end -end - -module MethodSource::SourceLocation::ProcExtensions - def source_location; end -end - -module MethodSource::SourceLocation::UnboundMethodExtensions - def source_location; end -end - -class MethodSource::SourceNotFoundError < ::StandardError; end -MethodSource::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/method_source@1.1.0.rbi b/sorbet/rbi/gems/method_source@1.1.0.rbi new file mode 100644 index 00000000..49356fce --- /dev/null +++ b/sorbet/rbi/gems/method_source@1.1.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `method_source` gem. +# Please instead update this file by running `bin/tapioca gem method_source`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi b/sorbet/rbi/gems/minitest-reporters@1.8.0.rbi similarity index 75% rename from sorbet/rbi/gems/minitest-reporters@1.5.0.rbi rename to sorbet/rbi/gems/minitest-reporters@1.8.0.rbi index 0fc64f91..67b4f0cc 100644 --- a/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +++ b/sorbet/rbi/gems/minitest-reporters@1.8.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `minitest-reporters` gem. # Please instead update this file by running `bin/tapioca gem minitest-reporters`. + # THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest@5.15.0.rbi b/sorbet/rbi/gems/minitest@5.15.0.rbi deleted file mode 100644 index 10dd73f0..00000000 --- a/sorbet/rbi/gems/minitest@5.15.0.rbi +++ /dev/null @@ -1,524 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `minitest` gem. -# Please instead update this file by running `bin/tapioca gem minitest`. - -::RUBY19 = T.let(T.unsafe(nil), TrueClass) - -module Kernel - private - - def describe(desc, *additional_desc, &block); end -end - -module Minitest - class << self - def __run(reporter, options); end - def after_run(&block); end - def autorun; end - def backtrace_filter; end - def backtrace_filter=(_arg0); end - def clock_time; end - def extensions; end - def extensions=(_arg0); end - def filter_backtrace(bt); end - def info_signal; end - def info_signal=(_arg0); end - def init_plugins(options); end - def load_plugins; end - def parallel_executor; end - def parallel_executor=(_arg0); end - def process_args(args = T.unsafe(nil)); end - def reporter; end - def reporter=(_arg0); end - def run(args = T.unsafe(nil)); end - def run_one_method(klass, method_name); end - end -end - -class Minitest::AbstractReporter - include ::Mutex_m - - def lock; end - def locked?; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def start; end - def synchronize(&block); end - def try_lock; end - def unlock; end -end - -class Minitest::Assertion < ::Exception - def error; end - def location; end - def result_code; end - def result_label; end -end - -module Minitest::Assertions - def _synchronize; end - def assert(test, msg = T.unsafe(nil)); end - def assert_empty(obj, msg = T.unsafe(nil)); end - def assert_equal(exp, act, msg = T.unsafe(nil)); end - def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_includes(collection, obj, msg = T.unsafe(nil)); end - def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end - def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end - def assert_match(matcher, obj, msg = T.unsafe(nil)); end - def assert_mock(mock); end - def assert_nil(obj, msg = T.unsafe(nil)); end - def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end - def assert_path_exists(path, msg = T.unsafe(nil)); end - def assert_predicate(o1, op, msg = T.unsafe(nil)); end - def assert_raises(*exp); end - def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end - def assert_same(exp, act, msg = T.unsafe(nil)); end - def assert_send(send_ary, m = T.unsafe(nil)); end - def assert_silent; end - def assert_throws(sym, msg = T.unsafe(nil)); end - def capture_io; end - def capture_subprocess_io; end - def diff(exp, act); end - def exception_details(e, msg); end - def fail_after(y, m, d, msg); end - def flunk(msg = T.unsafe(nil)); end - def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end - def mu_pp(obj); end - def mu_pp_for_diff(obj); end - def pass(_msg = T.unsafe(nil)); end - def refute(test, msg = T.unsafe(nil)); end - def refute_empty(obj, msg = T.unsafe(nil)); end - def refute_equal(exp, act, msg = T.unsafe(nil)); end - def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_includes(collection, obj, msg = T.unsafe(nil)); end - def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end - def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end - def refute_match(matcher, obj, msg = T.unsafe(nil)); end - def refute_nil(obj, msg = T.unsafe(nil)); end - def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_path_exists(path, msg = T.unsafe(nil)); end - def refute_predicate(o1, op, msg = T.unsafe(nil)); end - def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end - def refute_same(exp, act, msg = T.unsafe(nil)); end - def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end - def skip_until(y, m, d, msg); end - def skipped?; end - def things_to_diff(exp, act); end - - class << self - def diff; end - def diff=(o); end - end -end - -Minitest::Assertions::E = T.let(T.unsafe(nil), String) -Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) - -class Minitest::BacktraceFilter - def filter(bt); end -end - -Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) - -class Minitest::CompositeReporter < ::Minitest::AbstractReporter - def initialize(*reporters); end - - def <<(reporter); end - def io; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def reporters; end - def reporters=(_arg0); end - def start; end -end - -Minitest::ENCS = T.let(T.unsafe(nil), TrueClass) - -class Minitest::Expectation < ::Struct - def ctx; end - def ctx=(_); end - def must_be(*args); end - def must_be_close_to(*args); end - def must_be_empty(*args); end - def must_be_instance_of(*args); end - def must_be_kind_of(*args); end - def must_be_nil(*args); end - def must_be_same_as(*args); end - def must_be_silent(*args); end - def must_be_within_delta(*args); end - def must_be_within_epsilon(*args); end - def must_equal(*args); end - def must_include(*args); end - def must_match(*args); end - def must_output(*args); end - def must_raise(*args); end - def must_respond_to(*args); end - def must_throw(*args); end - def path_must_exist(*args); end - def path_wont_exist(*args); end - def target; end - def target=(_); end - def wont_be(*args); end - def wont_be_close_to(*args); end - def wont_be_empty(*args); end - def wont_be_instance_of(*args); end - def wont_be_kind_of(*args); end - def wont_be_nil(*args); end - def wont_be_same_as(*args); end - def wont_be_within_delta(*args); end - def wont_be_within_epsilon(*args); end - def wont_equal(*args); end - def wont_include(*args); end - def wont_match(*args); end - def wont_respond_to(*args); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -module Minitest::Expectations - def must_be(*args); end - def must_be_close_to(*args); end - def must_be_empty(*args); end - def must_be_instance_of(*args); end - def must_be_kind_of(*args); end - def must_be_nil(*args); end - def must_be_same_as(*args); end - def must_be_silent(*args); end - def must_be_within_delta(*args); end - def must_be_within_epsilon(*args); end - def must_equal(*args); end - def must_include(*args); end - def must_match(*args); end - def must_output(*args); end - def must_raise(*args); end - def must_respond_to(*args); end - def must_throw(*args); end - def path_must_exist(*args); end - def path_wont_exist(*args); end - def wont_be(*args); end - def wont_be_close_to(*args); end - def wont_be_empty(*args); end - def wont_be_instance_of(*args); end - def wont_be_kind_of(*args); end - def wont_be_nil(*args); end - def wont_be_same_as(*args); end - def wont_be_within_delta(*args); end - def wont_be_within_epsilon(*args); end - def wont_equal(*args); end - def wont_include(*args); end - def wont_match(*args); end - def wont_respond_to(*args); end -end - -module Minitest::Guard - def jruby?(platform = T.unsafe(nil)); end - def maglev?(platform = T.unsafe(nil)); end - def mri?(platform = T.unsafe(nil)); end - def osx?(platform = T.unsafe(nil)); end - def rubinius?(platform = T.unsafe(nil)); end - def windows?(platform = T.unsafe(nil)); end -end - -class Minitest::Mock - def initialize(delegator = T.unsafe(nil)); end - - def ===(*args, &b); end - def __call(name, data); end - def __respond_to?(*_arg0); end - def class(*args, &b); end - def expect(name, retval, args = T.unsafe(nil), &blk); end - def inspect(*args, &b); end - def instance_eval(*args, &b); end - def instance_variables(*args, &b); end - def method_missing(sym, *args, &block); end - def object_id(*args, &b); end - def public_send(*args, &b); end - def respond_to?(sym, include_private = T.unsafe(nil)); end - def send(*args, &b); end - def to_s(*args, &b); end - def verify; end - - private - - def respond_to_missing?(*args, &b); end -end - -module Minitest::Parallel; end - -class Minitest::Parallel::Executor - def initialize(size); end - - def <<(work); end - def shutdown; end - def size; end - def start; end -end - -module Minitest::Parallel::Test - def _synchronize; end -end - -module Minitest::Parallel::Test::ClassMethods - def run_one_method(klass, method_name, reporter); end - def test_order; end -end - -class Minitest::ProgressReporter < ::Minitest::Reporter - def prerecord(klass, name); end - def record(result); end -end - -module Minitest::Reportable - def class_name; end - def error?; end - def location; end - def passed?; end - def result_code; end - def skipped?; end -end - -class Minitest::Reporter < ::Minitest::AbstractReporter - def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end - - def io; end - def io=(_arg0); end - def options; end - def options=(_arg0); end -end - -class Minitest::Result < ::Minitest::Runnable - include ::Minitest::Reportable - - def class_name; end - def klass; end - def klass=(_arg0); end - def source_location; end - def source_location=(_arg0); end - def to_s; end - - class << self - def from(runnable); end - end -end - -class Minitest::Runnable - def initialize(name); end - - def assertions; end - def assertions=(_arg0); end - def failure; end - def failures; end - def failures=(_arg0); end - def marshal_dump; end - def marshal_load(ary); end - def name; end - def name=(o); end - def passed?; end - def result_code; end - def run; end - def skipped?; end - def time; end - def time=(_arg0); end - def time_it; end - - class << self - def inherited(klass); end - def methods_matching(re); end - def on_signal(name, action); end - def reset; end - def run(reporter, options = T.unsafe(nil)); end - def run_one_method(klass, method_name, reporter); end - def runnable_methods; end - def runnables; end - def with_info_handler(reporter, &block); end - end -end - -Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) - -class Minitest::Skip < ::Minitest::Assertion - def result_label; end -end - -class Minitest::Spec < ::Minitest::Test - include ::Minitest::Spec::DSL::InstanceMethods - extend ::Minitest::Spec::DSL - - def initialize(name); end - - class << self - def current; end - end -end - -module Minitest::Spec::DSL - def after(_type = T.unsafe(nil), &block); end - def before(_type = T.unsafe(nil), &block); end - def children; end - def create(name, desc); end - def desc; end - def describe_stack; end - def it(desc = T.unsafe(nil), &block); end - def let(name, &block); end - def name; end - def nuke_test_methods!; end - def register_spec_type(*args, &block); end - def spec_type(desc, *additional); end - def specify(desc = T.unsafe(nil), &block); end - def subject(&block); end - def to_s; end - - class << self - def extended(obj); end - end -end - -module Minitest::Spec::DSL::InstanceMethods - def _(value = T.unsafe(nil), &block); end - def before_setup; end - def expect(value = T.unsafe(nil), &block); end - def value(value = T.unsafe(nil), &block); end -end - -Minitest::Spec::DSL::TYPES = T.let(T.unsafe(nil), Array) -Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) - -class Minitest::StatisticsReporter < ::Minitest::Reporter - def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end - - def assertions; end - def assertions=(_arg0); end - def count; end - def count=(_arg0); end - def errors; end - def errors=(_arg0); end - def failures; end - def failures=(_arg0); end - def passed?; end - def record(result); end - def report; end - def results; end - def results=(_arg0); end - def skips; end - def skips=(_arg0); end - def start; end - def start_time; end - def start_time=(_arg0); end - def total_time; end - def total_time=(_arg0); end -end - -class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - def aggregated_results(io); end - def old_sync; end - def old_sync=(_arg0); end - def report; end - def start; end - def statistics; end - def summary; end - def sync; end - def sync=(_arg0); end - def to_s; end - - private - - def binary_string; end -end - -class Minitest::Test < ::Minitest::Runnable - include ::Minitest::Assertions - include ::Minitest::Reportable - include ::Minitest::Test::LifecycleHooks - include ::Minitest::Guard - include ::Mocha::ParameterMatchers - include ::Mocha::Hooks - include ::Mocha::API - include ::Mocha::Integration::MiniTest::Adapter - extend ::Minitest::Guard - - def capture_exceptions; end - def class_name; end - def run; end - def sanitize_exception(e); end - def with_info_handler(&block); end - - class << self - def i_suck_and_my_tests_are_order_dependent!; end - def io_lock; end - def io_lock=(_arg0); end - def make_my_diffs_pretty!; end - def parallelize_me!; end - def runnable_methods; end - def test_order; end - end -end - -module Minitest::Test::LifecycleHooks - def after_setup; end - def after_teardown; end - def before_setup; end - def before_teardown; end - def setup; end - def teardown; end -end - -Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array) -Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) - -class Minitest::UnexpectedError < ::Minitest::Assertion - def initialize(error); end - - def backtrace; end - def error; end - def error=(_arg0); end - def message; end - def result_label; end -end - -class Minitest::Unit - class << self - def after_tests(&b); end - def autorun; end - end -end - -class Minitest::Unit::TestCase < ::Minitest::Test - class << self - def inherited(klass); end - end -end - -Minitest::Unit::VERSION = T.let(T.unsafe(nil), String) -Minitest::VERSION = T.let(T.unsafe(nil), String) -class MockExpectationError < ::StandardError; end - -class Module - def infect_an_assertion(meth, new_name, dont_flip = T.unsafe(nil)); end -end - -class Object < ::BasicObject - include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object - include ::PP::ObjectMixin - include ::Minitest::Expectations - include ::Mocha::ParameterMatchers::InstanceMethods - include ::Mocha::Inspect::ObjectMethods - include ::Mocha::ObjectMethods - - def stub(name, val_or_callable, *block_args); end -end diff --git a/sorbet/rbi/gems/minitest@6.0.6.rbi b/sorbet/rbi/gems/minitest@6.0.6.rbi new file mode 100644 index 00000000..311a5438 --- /dev/null +++ b/sorbet/rbi/gems/minitest@6.0.6.rbi @@ -0,0 +1,1856 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + + +# Kernel extensions for minitest +# +# pkg:gem/minitest#lib/minitest/spec.rb:38 +module Kernel + private + + # Describe a series of expectations for a given target +desc+. + # + # Defines a test class subclassing from either Minitest::Spec or + # from the surrounding describe's class. The surrounding class may + # subclass Minitest::Spec manually in order to easily share code: + # + # class MySpec < Minitest::Spec + # # ... shared code ... + # end + # + # class TestStuff < MySpec + # it "does stuff" do + # # shared code available here + # end + # describe "inner stuff" do + # it "still does stuff" do + # # ...and here + # end + # end + # end + # + # For more information on getting started with writing specs, see: + # + # http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html + # + # For some suggestions on how to improve your specs, try: + # + # https://betterspecs.org + # + # but do note that several items there are debatable or specific to + # rspec. + # + # For more information about expectations, see Minitest::Expectations. + # + # pkg:gem/minitest#lib/minitest/spec.rb:74 + def describe(desc, *additional_desc, &block); end +end + +# The top-level namespace for Minitest. Also the location of the main +# runtime. See +Minitest.run+ for more information. +# this is gonna break some shit? +# for ruby 3 +# :stopdoc: +# :stopdoc: +# :startdoc: +# +# pkg:gem/minitest#lib/minitest/parallel.rb:3 +module Minitest + class << self + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # pkg:gem/minitest#lib/minitest.rb:95 + def after_run(&block); end + + # pkg:gem/minitest#lib/minitest.rb:20 + def allow_fork; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def allow_fork=(_arg0); end + + # Registers Minitest to run at process exit + # + # pkg:gem/minitest#lib/minitest.rb:69 + def autorun; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def backtrace_filter; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def backtrace_filter=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:19 + def cattr_accessor(name); end + + # pkg:gem/minitest#lib/minitest.rb:1209 + def clock_time; end + + # pkg:gem/minitest#lib/minitest.rb:332 + def empty_run!(options); end + + # pkg:gem/minitest#lib/minitest.rb:20 + def extensions; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def extensions=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:365 + def filter_backtrace(bt); end + + # pkg:gem/minitest#lib/minitest.rb:20 + def info_signal; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def info_signal=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:134 + def init_plugins(options); end + + # Manually load plugins by name. + # + # pkg:gem/minitest#lib/minitest.rb:102 + def load(*names); end + + # pkg:gem/minitest#lib/minitest.rb:118 + def load_plugins; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def parallel_executor; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def parallel_executor=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:152 + def process_args(args = T.unsafe(nil)); end + + # Register a plugin to be used. Does NOT require / load it. + # + # pkg:gem/minitest#lib/minitest.rb:113 + def register_plugin(name_or_mod); end + + # pkg:gem/minitest#lib/minitest.rb:20 + def reporter; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # [Minitest.load_plugins] optional, called by user, or require what you want + # Minitest.autorun + # Minitest.run(args) + # Minitest.process_args + # Minitest.init_plugins + # Minitest.run_all_suites(reporter, options) + # Runnable.runnables.each |runnable_klass| + # runnable_klass.run_suite(reporter, options) + # filtered_methods = runnable_klass.filter_runnable_methods options + # filtered_methods.each |runnable_method| + # runnable_klass.run(self, runnable_method, reporter) + # runnable_klass.new(runnable_method).run + # + # pkg:gem/minitest#lib/minitest.rb:299 + def run(args = T.unsafe(nil)); end + + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # pkg:gem/minitest#lib/minitest.rb:352 + def run_all_suites(reporter, options); end + + # pkg:gem/minitest#lib/minitest.rb:20 + def seed; end + + # pkg:gem/minitest#lib/minitest.rb:20 + def seed=(_arg0); end + end +end + +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# pkg:gem/minitest#lib/minitest.rb:707 +class Minitest::AbstractReporter + # pkg:gem/minitest#lib/minitest.rb:709 + def initialize; end + + # Did this run pass? + # + # pkg:gem/minitest#lib/minitest.rb:744 + def passed?; end + + # About to start running a test. This allows a reporter to show + # that it is starting or that we are in the middle of a test run. + # + # pkg:gem/minitest#lib/minitest.rb:723 + def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # pkg:gem/minitest#lib/minitest.rb:732 + def record(result); end + + # Outputs the summary of the run. + # + # pkg:gem/minitest#lib/minitest.rb:738 + def report; end + + # Starts reporting on the run. + # + # pkg:gem/minitest#lib/minitest.rb:716 + def start; end + + # pkg:gem/minitest#lib/minitest.rb:748 + def synchronize(&block); end +end + +# Represents run failures. +# +# pkg:gem/minitest#lib/minitest.rb:1039 +class Minitest::Assertion < ::Exception + # pkg:gem/minitest#lib/minitest.rb:1042 + def error; end + + # Where was this run before an assertion was raised? + # + # pkg:gem/minitest#lib/minitest.rb:1049 + def location; end + + # pkg:gem/minitest#lib/minitest.rb:1057 + def result_code; end + + # pkg:gem/minitest#lib/minitest.rb:1061 + def result_label; end +end + +# pkg:gem/minitest#lib/minitest.rb:1040 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# pkg:gem/minitest#lib/minitest/assertions.rb:16 +module Minitest::Assertions + # pkg:gem/minitest#lib/minitest/assertions.rb:181 + def _synchronize; end + + # Fails unless +test+ is truthy. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:171 + def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:188 + def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # pkg:gem/minitest#lib/minitest/assertions.rb:206 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # pkg:gem/minitest#lib/minitest/assertions.rb:220 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:232 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:239 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:249 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:260 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:271 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # pkg:gem/minitest#lib/minitest/assertions.rb:283 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # pkg:gem/minitest#lib/minitest/assertions.rb:293 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # pkg:gem/minitest#lib/minitest/assertions.rb:312 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:336 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:355 + def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:373 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # pkg:gem/minitest#lib/minitest/assertions.rb:403 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:438 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:446 + def assert_same(exp, act, msg = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # pkg:gem/minitest#lib/minitest/assertions.rb:462 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # pkg:gem/minitest#lib/minitest/assertions.rb:471 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:507 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:540 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:57 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # pkg:gem/minitest#lib/minitest/assertions.rb:572 + def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:588 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:595 + def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that delays generation of an output message. If + # +msg+ is a proc (eg, from another +message+ call) return +msg+ + # as-is. Otherwise, return a proc that will output +msg+ along + # with the value of the result of the block passed to +message+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:606 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # pkg:gem/minitest#lib/minitest/assertions.rb:127 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:145 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # pkg:gem/minitest#lib/minitest/assertions.rb:617 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:624 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:632 + def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:642 + def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # pkg:gem/minitest#lib/minitest/assertions.rb:654 + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:666 + def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +obj+ includes +sub+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:673 + def refute_includes(obj, sub, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:681 + def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:691 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:699 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:708 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # pkg:gem/minitest#lib/minitest/assertions.rb:740 + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:750 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:725 + def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:764 + def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? + # + # pkg:gem/minitest#lib/minitest/assertions.rb:774 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:783 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:796 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:808 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:817 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:102 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:27 + def diff; end + + # Set the diff command to use in #diff. + # + # pkg:gem/minitest#lib/minitest/assertions.rb:45 + def diff=(o); end + end +end + +# pkg:gem/minitest#lib/minitest/assertions.rb:379 +Minitest::Assertions::NO_RE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/minitest#lib/minitest/assertions.rb:17 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# pkg:gem/minitest#lib/minitest.rb:1174 +class Minitest::BacktraceFilter + # pkg:gem/minitest#lib/minitest.rb:1183 + def initialize(regexp = T.unsafe(nil)); end + + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # pkg:gem/minitest#lib/minitest.rb:1191 + def filter(bt); end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # pkg:gem/minitest#lib/minitest.rb:1181 + def regexp; end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # pkg:gem/minitest#lib/minitest.rb:1181 + def regexp=(_arg0); end +end + +# pkg:gem/minitest#lib/minitest.rb:1176 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# pkg:gem/minitest#lib/minitest.rb:989 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # pkg:gem/minitest#lib/minitest.rb:995 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # pkg:gem/minitest#lib/minitest.rb:1007 + def <<(reporter); end + + # pkg:gem/minitest#lib/minitest.rb:1000 + def io; end + + # pkg:gem/minitest#lib/minitest.rb:1011 + def passed?; end + + # pkg:gem/minitest#lib/minitest.rb:1019 + def prerecord(klass, name); end + + # pkg:gem/minitest#lib/minitest.rb:1025 + def record(result); end + + # pkg:gem/minitest#lib/minitest.rb:1031 + def report; end + + # The list of reporters to dispatch to. + # + # pkg:gem/minitest#lib/minitest.rb:993 + def reporters; end + + # The list of reporters to dispatch to. + # + # pkg:gem/minitest#lib/minitest.rb:993 + def reporters=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:1015 + def start; end +end + +# Compresses backtraces. +# +# pkg:gem/minitest#lib/minitest/compress.rb:5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # pkg:gem/minitest#lib/minitest/compress.rb:11 + def compress(orig); end +end + +# fucking hell rdoc... +# +# pkg:gem/minitest#lib/minitest/spec.rb:31 +class Minitest::Expectation < ::Struct + include ::Minitest::Expectations + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def ctx; end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def ctx=(_); end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def target; end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def target=(_); end + + class << self + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def [](*_arg0); end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def inspect; end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def keyword_init?; end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def members; end + + # pkg:gem/minitest#lib/minitest/spec.rb:31 + def new(*_arg0); end + end +end + +# It's where you hide your "assertions". +# +# Please note, because of the way that expectations are implemented, +# all expectations (eg must_equal) are dependent upon a thread local +# variable +:current_spec+. If your specs rely on mixing threads into +# the specs themselves, you're better off using assertions or the new +# _(value) wrapper. For example: +# +# it "should still work in threads" do +# my_threaded_thingy do +# (1+1).must_equal 2 # bad +# assert_equal 2, 1+1 # good +# _(1 + 1).must_equal 2 # good +# value(1 + 1).must_equal 2 # good, also #expect +# _ { 1 + "1" }.must_raise TypeError # good +# end +# end +# +# pkg:gem/minitest#lib/minitest/expectations.rb:20 +module Minitest::Expectations + # pkg:gem/minitest#lib/minitest/expectations.rb:116 + def must_be(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:47 + def must_be_close_to(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:29 + def must_be_empty(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:76 + def must_be_instance_of(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:85 + def must_be_kind_of(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:103 + def must_be_nil(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:161 + def must_be_same_as(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:170 + def must_be_silent(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:49 + def must_be_within_delta(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:58 + def must_be_within_epsilon(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:38 + def must_equal(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:67 + def must_include(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:94 + def must_match(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:125 + def must_output(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:134 + def must_pattern_match(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:143 + def must_raise(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:152 + def must_respond_to(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:179 + def must_throw(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:188 + def path_must_exist(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:197 + def path_wont_exist(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:293 + def wont_be(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:224 + def wont_be_close_to(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:206 + def wont_be_empty(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:253 + def wont_be_instance_of(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:262 + def wont_be_kind_of(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:280 + def wont_be_nil(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:320 + def wont_be_same_as(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:226 + def wont_be_within_delta(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:235 + def wont_be_within_epsilon(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:215 + def wont_equal(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:244 + def wont_include(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:271 + def wont_match(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:302 + def wont_pattern_match(*args, **_arg1); end + + # pkg:gem/minitest#lib/minitest/expectations.rb:311 + def wont_respond_to(*args, **_arg1); end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# pkg:gem/minitest#lib/minitest.rb:1138 +module Minitest::Guard + # Is this running on jruby? + # + # pkg:gem/minitest#lib/minitest.rb:1143 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # pkg:gem/minitest#lib/minitest.rb:1150 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # pkg:gem/minitest#lib/minitest.rb:1157 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # pkg:gem/minitest#lib/minitest.rb:1164 + def windows?(platform = T.unsafe(nil)); end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:4 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# pkg:gem/minitest#lib/minitest/parallel.rb:9 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:19 + def initialize(size); end + + # Add a job to the queue + # + # pkg:gem/minitest#lib/minitest/parallel.rb:45 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:52 + def shutdown; end + + # The size of the pool of workers. + # + # pkg:gem/minitest#lib/minitest/parallel.rb:14 + def size; end + + # Start the executor + # + # pkg:gem/minitest#lib/minitest/parallel.rb:28 + def start; end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:58 +module Minitest::Parallel::Test + # pkg:gem/minitest#lib/minitest/parallel.rb:59 + def _synchronize; end +end + +# pkg:gem/minitest#lib/minitest/parallel.rb:61 +module Minitest::Parallel::Test::ClassMethods + # pkg:gem/minitest#lib/minitest/parallel.rb:62 + def run(klass, method_name, reporter); end + + # pkg:gem/minitest#lib/minitest/parallel.rb:66 + def run_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# pkg:gem/minitest#lib/minitest.rb:779 +class Minitest::ProgressReporter < ::Minitest::Reporter + # pkg:gem/minitest#lib/minitest.rb:780 + def prerecord(klass, name); end + + # pkg:gem/minitest#lib/minitest.rb:787 + def record(result); end +end + +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# pkg:gem/minitest#lib/minitest.rb:604 +module Minitest::Reportable + # pkg:gem/minitest#lib/minitest.rb:626 + def class_name; end + + # Did this run error? + # + # pkg:gem/minitest#lib/minitest.rb:647 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # pkg:gem/minitest#lib/minitest.rb:621 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # pkg:gem/minitest#lib/minitest.rb:611 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # pkg:gem/minitest#lib/minitest.rb:633 + def result_code; end + + # Was this run skipped? + # + # pkg:gem/minitest#lib/minitest.rb:640 + def skipped?; end +end + +# pkg:gem/minitest#lib/minitest.rb:615 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# AbstractReportera +# +# pkg:gem/minitest#lib/minitest.rb:755 +class Minitest::Reporter < ::Minitest::AbstractReporter + # pkg:gem/minitest#lib/minitest.rb:764 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # pkg:gem/minitest#lib/minitest.rb:757 + def io; end + + # The IO used to report. + # + # pkg:gem/minitest#lib/minitest.rb:757 + def io=(_arg0); end + + # Command-line options for this run. + # + # pkg:gem/minitest#lib/minitest.rb:762 + def options; end + + # Command-line options for this run. + # + # pkg:gem/minitest#lib/minitest.rb:762 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# pkg:gem/minitest#lib/minitest.rb:659 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # pkg:gem/minitest#lib/minitest.rb:690 + def class_name; end + + # The class name of the test result. + # + # pkg:gem/minitest#lib/minitest.rb:665 + def klass; end + + # The class name of the test result. + # + # pkg:gem/minitest#lib/minitest.rb:665 + def klass=(_arg0); end + + # The location of the test method. + # + # pkg:gem/minitest#lib/minitest.rb:670 + def source_location; end + + # The location of the test method. + # + # pkg:gem/minitest#lib/minitest.rb:670 + def source_location=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:694 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # pkg:gem/minitest#lib/minitest.rb:675 + def from(runnable); end + end +end + +# Represents anything "runnable", like Test, Spec, Benchmark, or +# whatever you can dream up. +# +# Subclasses of this are automatically registered and available in +# Runnable.runnables. +# +# pkg:gem/minitest#lib/minitest.rb:378 +class Minitest::Runnable + # pkg:gem/minitest#lib/minitest.rb:535 + def initialize(name); end + + # Number of assertions executed in this run. + # + # pkg:gem/minitest#lib/minitest.rb:382 + def assertions; end + + # Number of assertions executed in this run. + # + # pkg:gem/minitest#lib/minitest.rb:382 + def assertions=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:531 + def failure; end + + # An assertion raised during the run, if any. + # + # pkg:gem/minitest#lib/minitest.rb:387 + def failures; end + + # An assertion raised during the run, if any. + # + # pkg:gem/minitest#lib/minitest.rb:387 + def failures=(_arg0); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # Sets metadata, mainly used for +Result.from+. + # + # pkg:gem/minitest#lib/minitest.rb:550 + def metadata; end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # Sets metadata, mainly used for +Result.from+. + # + # pkg:gem/minitest#lib/minitest.rb:557 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # pkg:gem/minitest#lib/minitest.rb:562 + def metadata?; end + + # Name of the run. + # + # pkg:gem/minitest#lib/minitest.rb:405 + def name; end + + # Set the name of the run. + # + # pkg:gem/minitest#lib/minitest.rb:412 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # pkg:gem/minitest#lib/minitest.rb:579 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # pkg:gem/minitest#lib/minitest.rb:588 + def result_code; end + + # Runs a single method. Needs to return self. + # + # pkg:gem/minitest#lib/minitest.rb:569 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # pkg:gem/minitest#lib/minitest.rb:595 + def skipped?; end + + # The time it took to run. + # + # pkg:gem/minitest#lib/minitest.rb:392 + def time; end + + # The time it took to run. + # + # pkg:gem/minitest#lib/minitest.rb:392 + def time=(_arg0); end + + # pkg:gem/minitest#lib/minitest.rb:394 + def time_it; end + + class << self + # Returns an array of filtered +runnable_methods+. Uses + # options[:include] (--include arguments) and options[:exclude] + # (--exclude arguments) values to filter. + # + # pkg:gem/minitest#lib/minitest.rb:434 + def filter_runnable_methods(options = T.unsafe(nil)); end + + # re-open + # + # pkg:gem/minitest#lib/minitest.rb:1219 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # pkg:gem/minitest#lib/minitest.rb:419 + def methods_matching(re); end + + # pkg:gem/minitest#lib/minitest.rb:503 + def on_signal(name, action); end + + # pkg:gem/minitest#lib/minitest.rb:423 + def reset; end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # pkg:gem/minitest#lib/minitest.rb:484 + def run(klass, method_name, reporter); end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # pkg:gem/minitest#lib/minitest.rb:493 + def run_order; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # pkg:gem/minitest#lib/minitest.rb:452 + def run_suite(reporter, options = T.unsafe(nil)); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # pkg:gem/minitest#lib/minitest.rb:520 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # pkg:gem/minitest#lib/minitest.rb:527 + def runnables; end + + # pkg:gem/minitest#lib/minitest.rb:497 + def with_info_handler(_reporter = T.unsafe(nil), &block); end + end +end + +# pkg:gem/minitest#lib/minitest.rb:501 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# pkg:gem/minitest#lib/minitest.rb:1069 +class Minitest::Skip < ::Minitest::Assertion + # pkg:gem/minitest#lib/minitest.rb:1070 + def result_label; end +end + +# Minitest::Spec -- The faster, better, less-magical spec framework! +# +# For a list of expectations, see Minitest::Expectations. +# +# pkg:gem/minitest#lib/minitest/spec.rb:99 +class Minitest::Spec < ::Minitest::Test + include ::Minitest::Spec::DSL::InstanceMethods + extend ::Minitest::Spec::DSL +end + +# Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH. +# +# pkg:gem/minitest#lib/minitest/spec.rb:104 +module Minitest::Spec::DSL + # Define an 'after' action. Inherits the way normal methods should. + # + # NOTE: +type+ is ignored and is only there to make porting easier. + # + # Equivalent to Minitest::Test#teardown. + # + # pkg:gem/minitest#lib/minitest/spec.rb:189 + def after(_type = T.unsafe(nil), &block); end + + # Define a 'before' action. Inherits the way normal methods should. + # + # NOTE: +type+ is ignored and is only there to make porting easier. + # + # Equivalent to Minitest::Test#setup. + # + # pkg:gem/minitest#lib/minitest/spec.rb:175 + def before(_type = T.unsafe(nil), &block); end + + # pkg:gem/minitest#lib/minitest/spec.rb:158 + def children; end + + # pkg:gem/minitest#lib/minitest/spec.rb:254 + def create(name, desc); end + + # pkg:gem/minitest#lib/minitest/spec.rb:274 + def desc; end + + # pkg:gem/minitest#lib/minitest/spec.rb:154 + def describe_stack; end + + # pkg:gem/minitest#lib/minitest/spec.rb:272 + def inspect; end + + # Define an expectation with name +desc+. Name gets morphed to a + # proper test method name. For some freakish reason, people who + # write specs don't like class inheritance, so this goes way out of + # its way to make sure that expectations aren't inherited. + # + # This is also aliased to #specify and doesn't require a +desc+ arg. + # + # Hint: If you _do_ want inheritance, use minitest/test. You can mix + # and match between assertions and expectations as much as you want. + # + # pkg:gem/minitest#lib/minitest/spec.rb:207 + def it(desc = T.unsafe(nil), &block); end + + # Essentially, define an accessor for +name+ with +block+. + # + # Why use let instead of def? I honestly don't know. + # + # pkg:gem/minitest#lib/minitest/spec.rb:231 + def let(name, &block); end + + # pkg:gem/minitest#lib/minitest/spec.rb:267 + def name; end + + # pkg:gem/minitest#lib/minitest/spec.rb:162 + def nuke_test_methods!; end + + # Register a new type of spec that matches the spec's description. + # This method can take either a Regexp and a spec class or a spec + # class and a block that takes the description and returns true if + # it matches. + # + # Eg: + # + # register_spec_type(/Controller$/, Minitest::Spec::Rails) + # + # or: + # + # register_spec_type(Minitest::Spec::RailsModel) do |desc| + # desc.superclass == ActiveRecord::Base + # end + # + # pkg:gem/minitest#lib/minitest/spec.rb:130 + def register_spec_type(*args, &block); end + + # Figure out the spec class to use based on a spec's description. Eg: + # + # spec_type("BlahController") # => Minitest::Spec::Rails + # + # pkg:gem/minitest#lib/minitest/spec.rb:144 + def spec_type(desc, *additional); end + + # pkg:gem/minitest#lib/minitest/spec.rb:275 + def specify(desc = T.unsafe(nil), &block); end + + # Another lazy man's accessor generator. Made even more lazy by + # setting the name for you to +subject+. + # + # pkg:gem/minitest#lib/minitest/spec.rb:250 + def subject(&block); end + + # pkg:gem/minitest#lib/minitest/spec.rb:271 + def to_s; end + + class << self + # pkg:gem/minitest#lib/minitest/spec.rb:310 + def extended(obj); end + end +end + +# Rdoc... why are you so dumb? +# +# pkg:gem/minitest#lib/minitest/spec.rb:280 +module Minitest::Spec::DSL::InstanceMethods + # Takes a value or a block and returns a value monad that has + # all of Expectations methods available to it. + # + # _(1 + 1).must_equal 2 + # + # And for blocks: + # + # _ { 1 + "1" }.must_raise TypeError + # + # This method of expectation-based testing is preferable to + # straight-expectation methods (on Object) because it stores its + # test context, bypassing our hacky use of thread-local variables. + # + # It is also aliased to #value and #expect for your aesthetic + # pleasure: + # + # _(1 + 1).must_equal 2 + # value(1 + 1).must_equal 2 + # expect(1 + 1).must_equal 2 + # + # pkg:gem/minitest#lib/minitest/spec.rb:302 + def _(value = T.unsafe(nil), &block); end + + # pkg:gem/minitest#lib/minitest/spec.rb:307 + def expect(value = T.unsafe(nil), &block); end + + # pkg:gem/minitest#lib/minitest/spec.rb:306 + def value(value = T.unsafe(nil), &block); end +end + +# Contains pairs of matchers and Spec classes to be used to +# calculate the superclass of a top-level describe. This allows for +# automatically customizable spec types. +# +# See: register_spec_type and spec_type +# +# pkg:gem/minitest#lib/minitest/spec.rb:112 +Minitest::Spec::DSL::TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/minitest#lib/minitest/spec.rb:317 +Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print " true +# sheep.respond_to?(:foo) # => false +# sheep.chew +# sheep.foo # => raises NoMethodError exception +# +# pkg:gem/mocha#lib/mocha/api.rb:36 +module Mocha::API + include ::Mocha::ParameterMatchers::Methods + include ::Mocha::Hooks + + # Builds a new mock object + # + # @return [Mock] a new mock object + # + # @overload def mock(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def mock(expected_methods_vs_return_values = {}) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {Mock#expects} were called multiple times. + # @overload def mock(name, expected_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {Mock#expects} were called multiple times. + # + # @example Using expected_methods_vs_return_values Hash to setup expectations. + # def test_motor_starts_and_stops + # motor = mock('motor', start: true, stop: true) + # assert motor.start + # assert motor.stop + # # an error will be raised unless both Motor#start and Motor#stop have been called + # end + # + # pkg:gem/mocha#lib/mocha/api.rb:71 + def mock(*arguments); end + + # Builds a new sequence which can be used to constrain the order in which expectations can occur. + # + # Specify that an expected invocation must occur within a named {Sequence} by calling {Expectation#in_sequence} + # on each expectation or by passing a block within which all expectations should be constrained by the {Sequence}. + # + # @param [String] name name of sequence + # @yield optional block within which expectations should be constrained by the sequence + # @return [Sequence] a new sequence + # + # @see Expectation#in_sequence + # + # @example Ensure methods on egg are invoked in correct order. + # breakfast = sequence('breakfast') + # + # egg = mock('egg') + # egg.expects(:crack).in_sequence(breakfast) + # egg.expects(:fry).in_sequence(breakfast) + # egg.expects(:eat).in_sequence(breakfast) + # + # @example Ensure methods across multiple objects are invoked in correct order. + # sequence = sequence(:task_order) + # + # task_one = mock("task_one") + # task_two = mock("task_two") + # + # task_one.expects(:execute).in_sequence(sequence) + # task_two.expects(:execute).in_sequence(sequence) + # + # task_one.execute + # task_two.execute + # + # @example Ensure methods on egg are invoked in the correct order using a block. + # egg = mock('egg') + # sequence('breakfast') do + # egg.expects(:crack) + # egg.expects(:fry) + # egg.expects(:eat) + # end + # + # pkg:gem/mocha#lib/mocha/api.rb:172 + def sequence(name); end + + # Builds a new state machine which can be used to constrain the order in which expectations can occur. + # + # Specify the initial state of the state machine by using {StateMachine#starts_as}. + # + # Specify that an expected invocation should change the state of the state machine by using {Expectation#then}. + # + # Specify that an expected invocation should be constrained to occur within a particular +state+ by using {Expectation#when}. + # + # A test can contain multiple state machines. + # + # @param [String] name name of state machine + # @return [StateMachine] a new state machine + # + # @see Expectation#then + # @see Expectation#when + # @see StateMachine + # @example Constrain expected invocations to occur in particular states. + # power = states('power').starts_as('off') + # + # radio = mock('radio') + # radio.expects(:switch_on).then(power.is('on')) + # radio.expects(:select_channel).with('BBC Radio 4').when(power.is('on')) + # radio.expects(:adjust_volume).with(+5).when(power.is('on')) + # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) + # radio.expects(:adjust_volume).with(-5).when(power.is('on')) + # radio.expects(:switch_off).then(power.is('off')) + # + # pkg:gem/mocha#lib/mocha/api.rb:209 + def states(name); end + + # Builds a new mock object + # + # @return [Mock] a new mock object + # + # @overload def stub(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def stub(stubbed_methods_vs_return_values = {}) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # @overload def stub(name, stubbed_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # + # @example Using stubbed_methods_vs_return_values Hash to setup stubbed methods. + # def test_motor_starts_and_stops + # motor = stub('motor', start: true, stop: true) + # assert motor.start + # assert motor.stop + # # an error will not be raised even if either Motor#start or Motor#stop has not been called + # end + # + # pkg:gem/mocha#lib/mocha/api.rb:98 + def stub(*arguments); end + + # Builds a mock object that accepts calls to any method. By default it will return +nil+ for any method call. + # + # @return [Mock] a new mock object + # + # @overload def stub_everything(name) + # @param [String, Symbol] name identifies mock object in error messages. + # @overload def stub_everything(stubbed_methods_vs_return_values = {}) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # @overload def stub_everything(name, stubbed_methods_vs_return_values = {}) + # @param [String, Symbol] name identifies mock object in error messages. + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {Mock#stubs} were called multiple times. + # + # @example Ignore invocations of irrelevant methods. + # def test_motor_stops + # motor = stub_everything('motor', stop: true) + # assert_nil motor.irrelevant_method_1 # => no error raised + # assert_nil motor.irrelevant_method_2 # => no error raised + # assert motor.stop + # end + # + # pkg:gem/mocha#lib/mocha/api.rb:125 + def stub_everything(*arguments); end + + class << self + # @private + # + # pkg:gem/mocha#lib/mocha/api.rb:47 + def extended(mod); end + + # @private + # + # pkg:gem/mocha#lib/mocha/api.rb:41 + def included(_mod); end + end +end + +# pkg:gem/mocha#lib/mocha/any_instance_method.rb:6 +class Mocha::AnyInstanceMethod < ::Mocha::StubbedMethod + private + + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:17 + def original_method_owner; end + + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:9 + def stubbee; end + + # pkg:gem/mocha#lib/mocha/any_instance_method.rb:13 + def stubbee_method(method_name); end +end + +# pkg:gem/mocha#lib/mocha/any_instance_receiver.rb:4 +class Mocha::AnyInstanceReceiver + # pkg:gem/mocha#lib/mocha/any_instance_receiver.rb:5 + def initialize(klass); end + + # pkg:gem/mocha#lib/mocha/any_instance_receiver.rb:9 + def mocks; end +end + +# pkg:gem/mocha#lib/mocha/argument_iterator.rb:4 +class Mocha::ArgumentIterator + # pkg:gem/mocha#lib/mocha/argument_iterator.rb:5 + def initialize(argument); end + + # pkg:gem/mocha#lib/mocha/argument_iterator.rb:9 + def each(&block); end +end + +# pkg:gem/mocha#lib/mocha/backtrace_filter.rb:4 +class Mocha::BacktraceFilter + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:7 + def initialize(lib_directory = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:11 + def filtered(backtrace); end + + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:15 + def filtered_locations(locations); end + + private + + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:21 + def exclude?(path); end +end + +# pkg:gem/mocha#lib/mocha/backtrace_filter.rb:5 +Mocha::BacktraceFilter::LIB_DIRECTORY = T.let(T.unsafe(nil), String) + +# pkg:gem/mocha#lib/mocha/block_matchers.rb:4 +module Mocha::BlockMatchers; end + +# pkg:gem/mocha#lib/mocha/block_matchers.rb:13 +class Mocha::BlockMatchers::BlockGiven + # pkg:gem/mocha#lib/mocha/block_matchers.rb:14 + def match?(actual_block); end + + # pkg:gem/mocha#lib/mocha/block_matchers.rb:18 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/block_matchers.rb:23 +class Mocha::BlockMatchers::NoBlockGiven + # pkg:gem/mocha#lib/mocha/block_matchers.rb:24 + def match?(actual_block); end + + # pkg:gem/mocha#lib/mocha/block_matchers.rb:28 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/block_matchers.rb:5 +class Mocha::BlockMatchers::OptionalBlock + # pkg:gem/mocha#lib/mocha/block_matchers.rb:6 + def match?(_actual_block); end + + # pkg:gem/mocha#lib/mocha/block_matchers.rb:10 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/cardinality.rb:4 +class Mocha::Cardinality + # pkg:gem/mocha#lib/mocha/cardinality.rb:7 + def initialize(required = T.unsafe(nil), maximum = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:31 + def <<(invocation); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:83 + def actual_invocations; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:55 + def allowed_any_number_of_times?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:63 + def anticipated_times; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:16 + def at_least(count); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:20 + def at_most(count); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:12 + def exactly(count); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:35 + def invocations_allowed?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:39 + def invocations_never_allowed?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:79 + def invoked_times; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:47 + def needs_verifying?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:43 + def satisfied?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:24 + def times(range_or_count); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:59 + def used?; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:51 + def verified?; end + + protected + + # pkg:gem/mocha#lib/mocha/cardinality.rb:91 + def count(number); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:106 + def infinite?(number); end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:89 + def maximum; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:89 + def required; end + + # pkg:gem/mocha#lib/mocha/cardinality.rb:100 + def update(required, maximum); end +end + +# pkg:gem/mocha#lib/mocha/cardinality.rb:5 +Mocha::Cardinality::INFINITY = T.let(T.unsafe(nil), Float) + +# pkg:gem/mocha#lib/mocha/central.rb:4 +class Mocha::Central + # pkg:gem/mocha#lib/mocha/central.rb:22 + def initialize; end + + # pkg:gem/mocha#lib/mocha/central.rb:26 + def stub(method); end + + # pkg:gem/mocha#lib/mocha/central.rb:20 + def stubba_methods; end + + # pkg:gem/mocha#lib/mocha/central.rb:20 + def stubba_methods=(_arg0); end + + # pkg:gem/mocha#lib/mocha/central.rb:33 + def unstub(method); end + + # pkg:gem/mocha#lib/mocha/central.rb:40 + def unstub_all; end +end + +# pkg:gem/mocha#lib/mocha/central.rb:5 +class Mocha::Central::Null < ::Mocha::Central + # pkg:gem/mocha#lib/mocha/central.rb:6 + def initialize(&block); end + + # pkg:gem/mocha#lib/mocha/central.rb:11 + def stub(*_arg0); end + + # pkg:gem/mocha#lib/mocha/central.rb:15 + def unstub(*_arg0); end +end + +# pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:4 +class Mocha::ChangeStateSideEffect + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:5 + def initialize(state); end + + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:13 + def mocha_inspect; end + + # pkg:gem/mocha#lib/mocha/change_state_side_effect.rb:9 + def perform; end +end + +# Methods added to all classes to allow mocking and stubbing on real (i.e. non-mock) objects. +# +# pkg:gem/mocha#lib/mocha/class_methods.rb:8 +module Mocha::ClassMethods + # pkg:gem/mocha#lib/mocha/class_methods.rb:65 + def __method_exists__?(method, include_public_methods: T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/class_methods.rb:56 + def __method_visibility__(method, include_public_methods: T.unsafe(nil)); end + + # @return [Mock] a mock object which will detect calls to any instance of this class. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # + # @example Return false to invocation of +Product#save+ for any instance of +Product+. + # Product.any_instance.stubs(:save).returns(false) + # product_1 = Product.new + # assert_equal false, product_1.save + # product_2 = Product.new + # assert_equal false, product_2.save + # + # pkg:gem/mocha#lib/mocha/class_methods.rb:47 + def any_instance; end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/class_methods.rb:10 +class Mocha::ClassMethods::AnyInstance + # pkg:gem/mocha#lib/mocha/class_methods.rb:11 + def initialize(klass); end + + # pkg:gem/mocha#lib/mocha/class_methods.rb:15 + def mocha(instantiate: T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/class_methods.rb:27 + def stubba_class; end + + # pkg:gem/mocha#lib/mocha/class_methods.rb:23 + def stubba_method; end + + # pkg:gem/mocha#lib/mocha/class_methods.rb:35 + def stubba_object; end + + # pkg:gem/mocha#lib/mocha/class_methods.rb:31 + def stubba_respond_to?(symbol); end +end + +# This class provides a number of ways to configure the library. +# +# Typically the configuration is set globally in a +test_helper.rb+ or +spec_helper.rb+ file. +# +# @example Setting multiple configuration options +# Mocha.configure do |c| +# c.stubbing_method_unnecessarily = :prevent +# c.stubbing_method_on_non_mock_object = :warn +# end +# +# pkg:gem/mocha#lib/mocha/configuration.rb:40 +class Mocha::Configuration + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:55 + def initialize(options = T.unsafe(nil)); end + + # Display matching invocations alongside expectations on Mocha-related test failure. + # + # @param [Boolean] value +true+ to enable display of matching invocations; disabled by default. + # + # @example Enable display of matching invocations + # Mocha.configure do |c| + # c.display_matching_invocations_on_failure = true + # end + # + # foo = mock('foo') + # foo.expects(:bar) + # foo.stubs(:baz).returns('baz').raises(RuntimeError).throws(:tag, 'value') + # + # foo.baz(1, 2) + # assert_raises(RuntimeError) { foo.baz(3, 4) } + # assert_throws(:tag) { foo.baz(5, 6) } + # + # not all expectations were satisfied + # unsatisfied expectations: + # - expected exactly once, invoked never: #.bar + # satisfied expectations: + # - allowed any number of times, invoked 3 times: #.baz(any_parameters) + # - #.baz(1, 2) # => "baz" + # - #.baz(3, 4) # => raised RuntimeError + # - #.baz(5, 6) # => threw (:tag, "value") + # + # pkg:gem/mocha#lib/mocha/configuration.rb:223 + def display_matching_invocations_on_failure=(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:228 + def display_matching_invocations_on_failure?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:65 + def merge(other); end + + # Perform strict keyword argument comparison. Only supported in Ruby >= v2.7. + # + # When this option is set to +false+ a positional +Hash+ and a set of keyword arguments are treated the same during comparison, which can lead to misleading passing tests in Ruby >= v3.0 (see examples below). However, a deprecation warning will be displayed if a positional +Hash+ matches a set of keyword arguments or vice versa. + # + # For more details on keyword arguments in Ruby v3, refer to {https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0 this article}. + # + # Note that +Hash+-related matchers such as {ParameterMatchers::Methods#has_value} or {ParameterMatchers::Methods#has_key} will still treat a positional +Hash+ and a set of keyword arguments the same, so misleading passing tests are still possible when they are used. + # + # This configuration option is +false+ by default in Ruby v2.7 to enable gradual adoption, but +true+ by default in Ruby >= v3.0. + # + # @param [Boolean] value +true+ to enable strict keyword argument matching. + # + # @example Loose keyword argument matching (default in Ruby v2.7) + # + # Mocha.configure do |c| + # c.strict_keyword_argument_matching = false + # end + # + # class Example + # def foo(a, bar:); end + # end + # + # example = Example.new + # example.expects(:foo).with('a', bar: 'b') + # example.foo('a', { bar: 'b' }) + # # This passes the test, but would result in an ArgumentError in practice + # + # @example Strict keyword argument matching (default in Ruby >= v3.0) + # + # Mocha.configure do |c| + # c.strict_keyword_argument_matching = true + # end + # + # class Example + # def foo(a, bar:); end + # end + # + # example = Example.new + # example.expects(:foo).with('a', bar: 'b') + # example.foo('a', { bar: 'b' }) + # # This now fails as expected + # + # pkg:gem/mocha#lib/mocha/configuration.rb:273 + def strict_keyword_argument_matching=(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:280 + def strict_keyword_argument_matching?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:127 + def stubbing_method_on_non_mock_object; end + + # Configure whether stubbing methods on non-mock objects is allowed. + # + # If you like the idea of {http://www.jmock.org/oopsla2004.pdf mocking roles not objects} and {http://www.mockobjects.com/2007/04/test-smell-mocking-concrete-classes.html you don't like stubbing concrete classes}, this is the setting for you. However, while this restriction makes a lot of sense in Java with its {http://java.sun.com/docs/books/tutorial/java/concepts/interface.html explicit interfaces}, it may be moot in Ruby where roles are probably best represented as Modules. + # + # When +value+ is +:allow+, do nothing. This is the default. + # When +value+ is +:warn+, display a warning. + # When +value+ is +:prevent+, raise a {StubbingError}. + # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # + # @example Preventing stubbing of a method on a non-mock object + # Mocha.configure do |c| + # c.stubbing_method_on_non_mock_object = :prevent + # end + # + # class Example + # def example_method; end + # end + # + # example = Example.new + # example.stubs(:example_method) + # # => Mocha::StubbingError: stubbing method on non-mock object: + # # => #.example_method + # + # pkg:gem/mocha#lib/mocha/configuration.rb:122 + def stubbing_method_on_non_mock_object=(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:94 + def stubbing_method_unnecessarily; end + + # Configure whether stubbing methods unnecessarily is allowed. + # + # This is useful for identifying unused stubs. Unused stubs are often accidentally introduced when code is {http://martinfowler.com/bliki/DefinitionOfRefactoring.html refactored}. + # + # When +value+ is +:allow+, do nothing. This is the default. + # When +value+ is +:warn+, display a warning. + # When +value+ is +:prevent+, raise a {StubbingError}. + # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # + # @example Preventing unnecessary stubbing of a method + # Mocha.configure do |c| + # c.stubbing_method_unnecessarily = :prevent + # end + # + # example = mock('example') + # example.stubs(:unused_stub) + # # => Mocha::StubbingError: stubbing method unnecessarily: + # # => #.unused_stub(any_parameters) + # + # pkg:gem/mocha#lib/mocha/configuration.rb:89 + def stubbing_method_unnecessarily=(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:160 + def stubbing_non_existent_method; end + + # Configure whether stubbing of non-existent methods is allowed. + # + # This is useful if you want to ensure that methods you're mocking really exist. A common criticism of unit tests with mock objects is that such a test may (incorrectly) pass when an equivalent non-mocking test would (correctly) fail. While you should always have some integration tests, particularly for critical business functionality, this Mocha configuration setting should catch scenarios when mocked methods and real methods have become misaligned. + # + # When +value+ is +:allow+, do nothing. This is the default. + # When +value+ is +:warn+, display a warning. + # When +value+ is +:prevent+, raise a {StubbingError}. + # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # + # @example Preventing stubbing of a non-existent method + # + # Mocha.configure do |c| + # c.stubbing_non_existent_method = :prevent + # end + # + # class Example + # end + # + # example = Example.new + # example.stubs(:method_that_doesnt_exist) + # # => Mocha::StubbingError: stubbing non-existent method: + # # => #.method_that_doesnt_exist + # + # pkg:gem/mocha#lib/mocha/configuration.rb:155 + def stubbing_non_existent_method=(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:194 + def stubbing_non_public_method; end + + # Configure whether stubbing of non-public methods is allowed. + # + # Many people think that it's good practice only to mock public methods. This is one way to prevent your tests being too tightly coupled to the internal implementation of a class. Such tests tend to be very brittle and not much use when refactoring. + # + # When +value+ is +:allow+, do nothing. This is the default. + # When +value+ is +:warn+, display a warning. + # When +value+ is +:prevent+, raise a {StubbingError}. + # + # @param [Symbol] value one of +:allow+, +:warn+, +:prevent+. + # + # @example Preventing stubbing of a non-public method + # Mocha.configure do |c| + # c.stubbing_non_public_method = :prevent + # end + # + # class Example + # def internal_method; end + # private :internal_method + # end + # + # example = Example.new + # example.stubs(:internal_method) + # # => Mocha::StubbingError: stubbing non-public method: + # # => #.internal_method + # + # pkg:gem/mocha#lib/mocha/configuration.rb:189 + def stubbing_non_public_method=(value); end + + protected + + # pkg:gem/mocha#lib/mocha/configuration.rb:51 + def options; end + + private + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:60 + def initialize_copy(other); end + + class << self + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:311 + def configuration; end + + # Temporarily modify {Configuration} options. + # + # The supplied +temporary_options+ will override the current configuration for the duration of the supplied block. + # The configuration will be returned to its original state when the block returns. + # + # @param [Hash] temporary_options the configuration options to apply for the duration of the block. + # @yield block during which the configuration change will be in force. + # + # @example Temporarily prevent stubbing of non-mock object + # Mocha::Configuration.override(stubbing_method_on_non_mock_object: :prevent) do + # 123.stubs(:to_s).returns('456') + # end + # + # pkg:gem/mocha#lib/mocha/configuration.rb:302 + def override(temporary_options); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:286 + def reset_configuration; end + + private + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:318 + def change_config(action, new_value, &block); end + + # @private + # + # pkg:gem/mocha#lib/mocha/configuration.rb:327 + def temporarily_change_config(action, new_value); end + end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/configuration.rb:42 +Mocha::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/mocha#lib/mocha/default_name.rb:4 +class Mocha::DefaultName + # pkg:gem/mocha#lib/mocha/default_name.rb:5 + def initialize(mock); end + + # pkg:gem/mocha#lib/mocha/default_name.rb:9 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/default_receiver.rb:4 +class Mocha::DefaultReceiver + # pkg:gem/mocha#lib/mocha/default_receiver.rb:5 + def initialize(mock); end + + # pkg:gem/mocha#lib/mocha/default_receiver.rb:9 + def mocks; end +end + +# pkg:gem/mocha#lib/mocha/deprecation.rb:6 +class Mocha::Deprecation + class << self + # pkg:gem/mocha#lib/mocha/deprecation.rb:8 + def warning(message); end + end +end + +# pkg:gem/mocha#lib/mocha/detection/minitest.rb:4 +module Mocha::Detection; end + +# pkg:gem/mocha#lib/mocha/detection/minitest.rb:5 +module Mocha::Detection::Minitest + class << self + # pkg:gem/mocha#lib/mocha/detection/minitest.rb:6 + def testcase; end + + # pkg:gem/mocha#lib/mocha/detection/minitest.rb:14 + def version; end + end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/error_with_filtered_backtrace.rb:7 +class Mocha::ErrorWithFilteredBacktrace < ::StandardError + # @private + # + # pkg:gem/mocha#lib/mocha/error_with_filtered_backtrace.rb:9 + def initialize(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end +end + +# pkg:gem/mocha#lib/mocha/exception_raiser.rb:4 +class Mocha::ExceptionRaiser + # pkg:gem/mocha#lib/mocha/exception_raiser.rb:5 + def initialize(exception, message); end + + # pkg:gem/mocha#lib/mocha/exception_raiser.rb:10 + def evaluate(invocation); end +end + +# Methods on expectations returned from {Mock#expects}, {Mock#stubs}, {ObjectMethods#expects} and {ObjectMethods#stubs}. +# +# pkg:gem/mocha#lib/mocha/expectation.rb:20 +class Mocha::Expectation + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:652 + def initialize(mock, expected_method_name, backtrace_locations = T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:671 + def add_in_sequence_ordering_constraint(sequence); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:666 + def add_ordering_constraint(ordering_constraint); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:676 + def add_side_effect(side_effect); end + + # Modifies expectation so that the expected method must be called at least a +minimum_number_of_times+. + # + # @param [Integer] minimum_number_of_times minimum number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called at least twice. + # object = mock() + # object.expects(:expected_method).at_least(2) + # 3.times { object.expected_method } + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).at_least(2) + # object.expected_method + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:164 + def at_least(minimum_number_of_times); end + + # Modifies expectation so that the expected method must be called at least once. This is equivalent to calling {#at_least} with an argument of +1+. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called at least once. + # object = mock() + # object.expects(:expected_method).at_least_once + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).at_least_once + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:182 + def at_least_once; end + + # Modifies expectation so that the expected method must be called at most a +maximum_number_of_times+. + # + # @param [Integer] maximum_number_of_times maximum number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called at most twice. + # object = mock() + # object.expects(:expected_method).at_most(2) + # 2.times { object.expected_method } + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).at_most(2) + # 3.times { object.expected_method } # => unexpected invocation + # + # pkg:gem/mocha#lib/mocha/expectation.rb:200 + def at_most(maximum_number_of_times); end + + # Modifies expectation so that the expected method must be called at most once. This is equivalent to calling {#at_most} with an argument of +1+. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called at most once. + # object = mock() + # object.expects(:expected_method).at_most_once + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).at_most_once + # 2.times { object.expected_method } # => unexpected invocation + # + # pkg:gem/mocha#lib/mocha/expectation.rb:218 + def at_most_once; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:764 + def backtrace; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:649 + def backtrace_locations; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:769 + def definition_location; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:686 + def in_correct_order?; end + + # Constrains the expectation so that it must be invoked at the current point in the +sequence+. + # + # To expect a sequence of invocations, write the expectations in order and add the +in_sequence(sequence)+ clause to each one. + # + # Expectations in a +sequence+ can have any invocation count. + # + # If an expectation in a sequence is stubbed, rather than expected, it can be skipped in the +sequence+. + # + # An expected method can appear in multiple sequences. + # + # @param [Sequence] sequence sequence in which expected method should appear. + # @param [*Array] sequences more sequences in which expected method should appear. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see API#sequence + # + # @example Ensure methods are invoked in a specified order. + # breakfast = sequence('breakfast') + # + # egg = mock('egg') + # egg.expects(:crack).in_sequence(breakfast) + # egg.expects(:fry).in_sequence(breakfast) + # egg.expects(:eat).in_sequence(breakfast) + # + # pkg:gem/mocha#lib/mocha/expectation.rb:643 + def in_sequence(sequence, *sequences); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:740 + def inspect; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:707 + def invocations_allowed?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:712 + def invocations_never_allowed?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:722 + def invoke(invocation); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:701 + def match?(invocation, ignoring_order: T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:696 + def matches_method?(method_name); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:757 + def method_signature; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:747 + def mocha_inspect; end + + # Modifies expectation so that when the expected method is called, it yields multiple times per invocation with the specified +parameter_groups+. + # + # If no block is provided, the method will still attempt to yield resulting in a +LocalJumpError+. Note that this is what would happen if a "real" (non-mock) method implementation tried to yield to a non-existent block. + # + # @param [*Array] parameter_groups each element of +parameter_groups+ should iself be an +Array+ representing the parameters to be passed to the block for a single yield. Any element of +parameter_groups+ that is not an +Array+ is wrapped in an +Array+. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # + # @example When +foreach+ is called, the stub will invoke the block twice, the first time it passes ['row1_col1', 'row1_col2'] as the parameters, and the second time it passes ['row2_col1', ''] as the parameters. + # csv = mock() + # csv.expects(:foreach).with("path/to/file.csv").multiple_yields(['row1_col1', 'row1_col2'], ['row2_col1', '']) + # rows = [] + # csv.foreach { |row| rows << row } + # rows # => [['row1_col1', 'row1_col2'], ['row2_col1', '']] + # + # @example Yield different groups of parameters on different invocations of the expected method. Simulating a situation where the CSV file at 'path/to/file.csv' has been modified between the two calls to +foreach+. + # csv = mock() + # csv.stubs(:foreach).with("path/to/file.csv").multiple_yields(['old_row1_col1', 'old_row1_col2'], ['old_row2_col1', '']).then.multiple_yields(['new_row1_col1', ''], ['new_row2_col1', 'new_row2_col2']) + # rows_from_first_invocation = [] + # rows_from_second_invocation = [] + # csv.foreach { |row| rows_from_first_invocation << row } # first invocation + # csv.foreach { |row| rows_from_second_invocation << row } # second invocation + # rows_from_first_invocation # => [['old_row1_col1', 'old_row1_col2'], ['old_row2_col1', '']] + # rows_from_second_invocation # => [['new_row1_col1', ''], ['new_row2_col1', 'new_row2_col2']] + # + # pkg:gem/mocha#lib/mocha/expectation.rb:430 + def multiple_yields(*parameter_groups); end + + # Modifies expectation so that the expected method must never be called. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must never be called. + # object = mock() + # object.expects(:expected_method).never + # object.expected_method # => unexpected invocation + # + # object = mock() + # object.expects(:expected_method).never + # # => verify succeeds + # + # pkg:gem/mocha#lib/mocha/expectation.rb:144 + def never; end + + # Modifies expectation so that the expected method must be called exactly once. This is equivalent to calling {#times} with an argument of +1+. + # + # Note that this is the default behaviour for an expectation, but you may wish to use it for clarity/emphasis. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be invoked exactly once. + # object = mock() + # object.expects(:expected_method).once + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).once + # object.expected_method + # object.expected_method # => unexpected invocation + # + # object = mock() + # object.expects(:expected_method).once + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:127 + def once; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:691 + def ordering_constraints_not_allowing_invocation_now; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:681 + def perform_side_effects; end + + # Modifies expectation so that when the expected method is called, it raises the specified +exception+ with the specified +message+ i.e. calls +Kernel#raise(exception, message)+. + # + # @param [Class,Exception,String,#exception] exception exception to be raised or message to be passed to RuntimeError. + # @param [String] message exception message. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see Kernel#raise + # @see #then + # + # @overload def raises + # @overload def raises(exception) + # @overload def raises(exception, message) + # + # @example Raise specified exception if expected method is invoked. + # object = stub() + # object.stubs(:expected_method).raises(Exception, 'message') + # object.expected_method # => raises exception of class Exception and with message 'message' + # + # @example Raise custom exception with extra constructor parameters by passing in an instance of the exception. + # object = stub() + # object.stubs(:expected_method).raises(MyException.new('message', 1, 2, 3)) + # object.expected_method # => raises the specified instance of MyException + # + # @example Raise different exceptions on consecutive invocations of the expected method. + # object = stub() + # object.stubs(:expected_method).raises(Exception1).then.raises(Exception2) + # object.expected_method # => raises exception of class Exception1 + # object.expected_method # => raises exception of class Exception2 + # + # @example Raise an exception on first invocation of expected method and then return values on subsequent invocations. + # object = stub() + # object.stubs(:expected_method).raises(Exception).then.returns(2, 3) + # object.expected_method # => raises exception of class Exception1 + # object.expected_method # => 2 + # object.expected_method # => 3 + # + # pkg:gem/mocha#lib/mocha/expectation.rb:517 + def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end + + # Modifies expectation so that when the expected method is called, it returns the specified +value+. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # + # @overload def returns(value) + # @param [Object] value value to return on invocation of expected method. + # @overload def returns(*values) + # @param [*Array] values values to return on consecutive invocations of expected method. + # + # @example Return the same value on every invocation. + # object = mock() + # object.stubs(:stubbed_method).returns('result') + # object.stubbed_method # => 'result' + # object.stubbed_method # => 'result' + # + # @example Return a different value on consecutive invocations. + # object = mock() + # object.stubs(:stubbed_method).returns(1, 2) + # object.stubbed_method # => 1 + # object.stubbed_method # => 2 + # + # @example Alternative way to return a different value on consecutive invocations. + # object = mock() + # object.stubs(:expected_method).returns(1, 2).then.returns(3) + # object.expected_method # => 1 + # object.expected_method # => 2 + # object.expected_method # => 3 + # + # @example May be called in conjunction with {#raises} on the same expectation. + # object = mock() + # object.stubs(:expected_method).returns(1, 2).then.raises(Exception) + # object.expected_method # => 1 + # object.expected_method # => 2 + # object.expected_method # => raises exception of class Exception1 + # + # @example Note that in Ruby a method returning multiple values is exactly equivalent to a method returning an +Array+ of those values. + # object = mock() + # object.stubs(:expected_method).returns([1, 2]) + # x, y = object.expected_method + # x # => 1 + # y # => 2 + # + # pkg:gem/mocha#lib/mocha/expectation.rb:477 + def returns(*values); end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:717 + def satisfied?; end + + # @overload def then + # Used as syntactic sugar to improve readability. It has no effect on state of the expectation. + # @overload def then(state) + # Used to change the +state_machine+ to the specified state when the expected invocation occurs. + # @param [StateMachine::State] state state_machine.is(state_name) provides a mechanism to change the +state_machine+ into the state specified by +state_name+ when the expected method is invoked. + # + # @see API#states + # @see StateMachine + # @see #when + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Using {#then} as syntactic sugar when specifying values to be returned and exceptions to be raised on consecutive invocations of the expected method. + # object = mock() + # object.stubs(:expected_method).returns(1, 2).then.raises(Exception).then.returns(4) + # object.expected_method # => 1 + # object.expected_method # => 2 + # object.expected_method # => raises exception of class Exception + # object.expected_method # => 4 + # + # @example Using {#then} to change the +state+ of a +state_machine+ on the invocation of an expected method. + # power = states('power').starts_as('off') + # + # radio = mock('radio') + # radio.expects(:switch_on).then(power.is('on')) + # radio.expects(:select_channel).with('BBC Radio 4').when(power.is('on')) + # radio.expects(:adjust_volume).with(+5).when(power.is('on')) + # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) + # radio.expects(:adjust_volume).with(-5).when(power.is('on')) + # radio.expects(:switch_off).then(power.is('off')) + # + # pkg:gem/mocha#lib/mocha/expectation.rb:591 + def then(state = T.unsafe(nil)); end + + # Modifies expectation so that the expected method must be called exactly three times. This is equivalent to calling {#times} with an argument of +3+. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be invoked exactly three times. + # object = mock() + # object.expects(:expected_method).thrice + # object.expected_method + # object.expected_method + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).thrice + # object.expected_method + # object.expected_method + # object.expected_method + # object.expected_method # => unexpected invocation + # + # object = mock() + # object.expects(:expected_method).thrice + # object.expected_method + # object.expected_method + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:76 + def thrice; end + + # Modifies expectation so that when the expected method is called, it throws the specified +tag+ with the specific return value +object+ i.e. calls +Kernel#throw(tag, object)+. + # + # @param [Symbol,String] tag tag to throw to transfer control to the active catch block. + # @param [Object] object return value for the catch block. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see Kernel#throw + # @see #then + # + # @overload def throw(tag) + # @overload def throw(tag, object) + # + # @example Throw tag when expected method is invoked. + # object = stub() + # object.stubs(:expected_method).throws(:done) + # object.expected_method # => throws tag :done + # + # @example Throw tag with return value +object+ c.f. +Kernel#throw+. + # object = stub() + # object.stubs(:expected_method).throws(:done, 'result') + # object.expected_method # => throws tag :done and causes catch block to return 'result' + # + # @example Throw different tags on consecutive invocations of the expected method. + # object = stub() + # object.stubs(:expected_method).throws(:done).then.throws(:continue) + # object.expected_method # => throws :done + # object.expected_method # => throws :continue + # + # @example Throw tag on first invocation of expected method and then return values for subsequent invocations. + # object = stub() + # object.stubs(:expected_method).throws(:done).then.returns(2, 3) + # object.expected_method # => throws :done + # object.expected_method # => 2 + # object.expected_method # => 3 + # + # pkg:gem/mocha#lib/mocha/expectation.rb:556 + def throws(tag, object = T.unsafe(nil)); end + + # Modifies expectation so that the number of invocations of the expected method must be within a specified range or exactly equal to a specified number. + # + # @param [Range,Integer] range_or_number specifies the allowable range for the number of expected invocations or the specified number of expected invocations. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Specifying an exact number of expected invocations. + # object = mock() + # object.expects(:expected_method).times(3) + # 3.times { object.expected_method } + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).times(3) + # 2.times { object.expected_method } + # # => verify fails + # + # @example Specifying a range for the number of expected invocations. + # object = mock() + # object.expects(:expected_method).times(2..4) + # 3.times { object.expected_method } + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).times(2..4) + # object.expected_method + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:47 + def times(range_or_number); end + + # Modifies expectation so that the expected method must be called exactly twice. This is equivalent to calling {#times} with an argument of +2+. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be invoked exactly twice. + # object = mock() + # object.expects(:expected_method).twice + # object.expected_method + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).twice + # object.expected_method + # object.expected_method + # object.expected_method # => unexpected invocation + # + # object = mock() + # object.expects(:expected_method).twice + # object.expected_method + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:102 + def twice; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:735 + def used?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:729 + def verified?(assertion_counter = T.unsafe(nil)); end + + # Constrains the expectation to occur only when the +state_machine+ is in the state specified by +state_predicate+. + # + # @param [StateMachine::StatePredicate] state_predicate +state_machine.is(state_name)+ provides a mechanism to determine whether the +state_machine+ is in the state specified by +state_predicate+ when the expected method is invoked. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @see API#states + # @see StateMachine + # @see #then + # + # @example Using {#when} to only allow invocation of methods when "power" state machine is in the "on" state. + # power = states('power').starts_as('off') + # + # radio = mock('radio') + # radio.expects(:switch_on).then(power.is('on')) + # radio.expects(:select_channel).with('BBC Radio 4').when(power.is('on')) + # radio.expects(:adjust_volume).with(+5).when(power.is('on')) + # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) + # radio.expects(:adjust_volume).with(-5).when(power.is('on')) + # radio.expects(:switch_off).then(power.is('off')) + # + # pkg:gem/mocha#lib/mocha/expectation.rb:615 + def when(state_predicate); end + + # Modifies expectation so that the expected method must be called with +expected_parameters_or_matchers+. + # + # May be used with Ruby literals or variables for exact matching or with parameter matchers for less-specific matching, e.g. {ParameterMatchers::Methods#includes}, {ParameterMatchers::Methods#has_key}, etc. See {ParameterMatchers} for a list of all available parameter matchers. + # + # Alternatively a block argument can be passed to {#with} to implement custom parameter matching. The block receives the +*actual_parameters+ as its arguments and should return +true+ if they are acceptable or +false+ otherwise. See the example below where a method is expected to be called with a value divisible by 4. + # The block argument takes precedence over +expected_parameters_or_matchers+. The block may be called multiple times per invocation of the expected method and so it should be idempotent. + # + # Note that if {#with} is called multiple times on the same expectation, the last call takes precedence; other calls are ignored. + # + # Positional arguments were separated from keyword arguments in Ruby v3 (see {https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0 this article}). In relation to this a new configuration option ({Configuration#strict_keyword_argument_matching=}) is available in Ruby >= 2.7. + # + # When {Configuration#strict_keyword_argument_matching=} is set to +false+ (which is the default in Ruby v2.7), a positional +Hash+ and a set of keyword arguments passed to {#with} are treated the same for the purposes of parameter matching. However, a deprecation warning will be displayed if a positional +Hash+ matches a set of keyword arguments or vice versa. + # + # When {Configuration#strict_keyword_argument_matching=} is set to +true+ (which is the default in Ruby >= v3.0), an actual positional +Hash+ will not match an expected set of keyword arguments; and vice versa, an actual set of keyword arguments will not match an expected positional +Hash+, i.e. the parameter matching is stricter. + # + # @see ParameterMatchers + # @see Configuration#strict_keyword_argument_matching= + # + # @param [Array] expected_parameters_or_matchers expected parameter values or parameter matchers. + # @yield optional block specifying custom matching. + # @yieldparam [Array] actual_parameters parameters with which expected method was invoked. + # @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable; +false+ otherwise. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called with exact parameter values. + # object = mock() + # object.expects(:expected_method).with(:param1, :param2) + # object.expected_method(:param1, :param2) + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).with(:param1, :param2) + # object.expected_method(:param3) + # # => verify fails + # + # @example Expected method must be called with parameters matching parameter matchers. + # object = mock() + # object.expects(:expected_method).with(includes('string2'), anything) + # object.expected_method(['string1', 'string2'], 'any-old-value') + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).with(includes('string2'), anything) + # object.expected_method(['string1'], 'any-old-value') + # # => verify fails + # + # @example Loose keyword argument matching (default in Ruby v2.7). + # + # Mocha.configure do |c| + # c.strict_keyword_argument_matching = false + # end + # + # class Example + # def foo(a, bar:); end + # end + # + # example = Example.new + # example.expects(:foo).with('a', bar: 'b') + # example.foo('a', { bar: 'b' }) + # # This passes the test, but would result in an ArgumentError in practice + # + # @example Strict keyword argument matching (default in Ruby >= 3.0). + # + # Mocha.configure do |c| + # c.strict_keyword_argument_matching = true + # end + # + # class Example + # def foo(a, bar:); end + # end + # + # example = Example.new + # example.expects(:foo).with('a', bar: 'b') + # example.foo('a', { bar: 'b' }) + # # This now fails as expected + # + # @example Using a block argument to expect the method to be called with a value divisible by 4. + # object = mock() + # object.expects(:expected_method).with() { |value| value % 4 == 0 } + # object.expected_method(16) + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).with() { |value| value % 4 == 0 } + # object.expected_method(17) + # # => verify fails + # + # @example Extracting a custom matcher into an instance method on the test class. + # class MyTest < Minitest::Test + # def test_expected_method_is_called_with_a_value_divisible_by_4 + # object = mock() + # object.expects(:expected_method).with(&method(:divisible_by_4)) + # object.expected_method(16) + # # => verify succeeds + # end + # + # private + # + # def divisible_by_4(value) + # value % 4 == 0 + # end + # end + # + # pkg:gem/mocha#lib/mocha/expectation.rb:324 + def with(*expected_parameters_or_matchers, **_arg1, &matching_block); end + + # Modifies expectation so that the expected method must be called with a block. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called with a block. + # object = mock() + # object.expects(:expected_method).with_block_given + # object.expected_method { 1 + 1 } + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).with_block_given + # object.expected_method + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:344 + def with_block_given; end + + # Modifies expectation so that the expected method must be called without a block. + # + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # + # @example Expected method must be called without a block. + # object = mock() + # object.expects(:expected_method).with_no_block_given + # object.expected_method + # # => verify succeeds + # + # object = mock() + # object.expects(:expected_method).with_block_given + # object.expected_method { 1 + 1 } + # # => verify fails + # + # pkg:gem/mocha#lib/mocha/expectation.rb:363 + def with_no_block_given; end + + # Modifies expectation so that when the expected method is called, it yields to the block with the specified +parameters+. + # + # If no +parameters+ are specified, it yields to the block without any parameters. + # + # If no block is provided, the method will still attempt to yield resulting in a +LocalJumpError+. Note that this is what would happen if a "real" (non-mock) method implementation tried to yield to a non-existent block. + # + # May be called multiple times on the same expectation for consecutive invocations. + # + # @param [*Array] parameters parameters to be yielded. + # @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained. + # @see #then + # + # @example Yield when expected method is invoked. + # benchmark = mock() + # benchmark.expects(:measure).yields + # yielded = false + # benchmark.measure { yielded = true } + # yielded # => true + # + # @example Yield parameters when expected method is invoked. + # fibonacci = mock() + # fibonacci.expects(:next_pair).yields(0, 1) + # sum = 0 + # fibonacci.next_pair { |first, second| sum = first + second } + # sum # => 1 + # + # @example Yield different parameters on different invocations of the expected method. + # fibonacci = mock() + # fibonacci.expects(:next_pair).yields(0, 1).then.yields(1, 1) + # sum = 0 + # fibonacci.next_pair { |first, second| sum = first + second } + # sum # => 1 + # fibonacci.next_pair { |first, second| sum = first + second } + # sum # => 2 + # + # pkg:gem/mocha#lib/mocha/expectation.rb:402 + def yields(*parameters); end +end + +# Default exception class raised when an unexpected invocation or an unsatisfied expectation occurs. +# +# Authors of test libraries may use +Mocha::ExpectationErrorFactory+ to have Mocha raise a different exception. +# +# @see Mocha::ExpectationErrorFactory +# +# pkg:gem/mocha#lib/mocha/expectation_error.rb:9 +class Mocha::ExpectationError < ::Exception; end + +# This factory determines what class of exception should be raised when Mocha detects a test failure. +# +# This class should only be used by authors of test libraries and not by typical "users" of Mocha. +# +# For example, it is used by +Mocha::Integration::Minitest::Adapter+ in order to have Mocha raise a +Minitest::Assertion+ which can then be sensibly handled by +Minitest::Unit::TestCase+. +# +# @see Mocha::Integration::Minitest::Adapter +# +# pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:14 +class Mocha::ExpectationErrorFactory + class << self + # @private + # + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:28 + def build(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end + + # @!attribute exception_class + # Determines what class of exception should be raised when Mocha detects a test failure. + # + # This attribute may be set by authors of test libraries in order to have Mocha raise exceptions of a specific class when there is an unexpected invocation or an unsatisfied expectation. + # + # By default a +Mocha::ExpectationError+ will be raised. + # + # @return [Exception] class of exception to be raised when an expectation error occurs + # @see Mocha::ExpectationError + # + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:25 + def exception_class; end + + # @!attribute exception_class + # Determines what class of exception should be raised when Mocha detects a test failure. + # + # This attribute may be set by authors of test libraries in order to have Mocha raise exceptions of a specific class when there is an unexpected invocation or an unsatisfied expectation. + # + # By default a +Mocha::ExpectationError+ will be raised. + # + # @return [Exception] class of exception to be raised when an expectation error occurs + # @see Mocha::ExpectationError + # + # pkg:gem/mocha#lib/mocha/expectation_error_factory.rb:25 + def exception_class=(_arg0); end + end +end + +# pkg:gem/mocha#lib/mocha/expectation_list.rb:4 +class Mocha::ExpectationList + # pkg:gem/mocha#lib/mocha/expectation_list.rb:5 + def initialize(expectations = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:54 + def +(other); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:9 + def add(expectation); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:50 + def any?; end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:46 + def length; end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:22 + def match(invocation, ignoring_order: T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:26 + def match_allowing_invocation(invocation); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:30 + def match_never_allowing_invocation(invocation); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:18 + def matches_method?(method_name); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:58 + def matching_expectations(invocation, ignoring_order: T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:14 + def remove_all_matching_method(method_name); end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:38 + def to_a; end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:42 + def to_set; end + + # pkg:gem/mocha#lib/mocha/expectation_list.rb:34 + def verified?(assertion_counter); end +end + +# Integration hooks for test library authors. +# +# The methods in this module should be called from test libraries wishing to integrate with Mocha. +# +# This module is provided as part of the +Mocha::API+ module and is therefore part of the public API, but should only be used by authors of test libraries and not by typical "users" of Mocha. +# +# Integration with Test::Unit and Minitest are provided as part of Mocha, because they are (or were once) part of the Ruby standard library. Integration with other test libraries is not provided as *part* of Mocha, but is supported by means of the methods in this module. +# +# See the code in the +Adapter+ modules for examples of how to use the methods in this module. +Mocha::ExpectationErrorFactory+ may be used if you want +Mocha+ to raise a different type of exception. +# +# @see Mocha::Integration::TestUnit::Adapter +# @see Mocha::Integration::Minitest::Adapter +# @see Mocha::ExpectationErrorFactory +# @see Mocha::API +# +# pkg:gem/mocha#lib/mocha/hooks.rb:20 +module Mocha::Hooks + # Prepares Mocha before a test (only for use by authors of test libraries). + # + # This method should be called before each individual test starts (including before any "setup" code). + # + # pkg:gem/mocha#lib/mocha/hooks.rb:29 + def mocha_setup(assertion_counter = T.unsafe(nil)); end + + # Resets Mocha after a test (only for use by authors of test libraries). + # + # This method should be called after each individual test has finished (including after any "teardown" code). + # + # pkg:gem/mocha#lib/mocha/hooks.rb:45 + def mocha_teardown(origin = T.unsafe(nil)); end + + # Returns a string representing the unit test name, to be included in some Mocha + # to help track down potential bugs. + # + # pkg:gem/mocha#lib/mocha/hooks.rb:51 + def mocha_test_name; end + + # Verifies that all mock expectations have been met (only for use by authors of test libraries). + # + # This is equivalent to a series of "assertions". + # + # This method should be called at the end of each individual test, before it has been determined whether or not the test has passed. + # + # pkg:gem/mocha#lib/mocha/hooks.rb:38 + def mocha_verify; end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/hooks.rb:22 +class Mocha::Hooks::NullAssertionCounter + # pkg:gem/mocha#lib/mocha/hooks.rb:23 + def increment; end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/ignoring_warning.rb:3 +module Mocha::IgnoringWarning + # pkg:gem/mocha#lib/mocha/ignoring_warning.rb:4 + def ignoring_warning(pattern, if_: T.unsafe(nil)); end +end + +# pkg:gem/mocha#lib/mocha/impersonating_any_instance_name.rb:4 +class Mocha::ImpersonatingAnyInstanceName + # pkg:gem/mocha#lib/mocha/impersonating_any_instance_name.rb:5 + def initialize(klass); end + + # pkg:gem/mocha#lib/mocha/impersonating_any_instance_name.rb:9 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/impersonating_name.rb:4 +class Mocha::ImpersonatingName + # pkg:gem/mocha#lib/mocha/impersonating_name.rb:5 + def initialize(object); end + + # pkg:gem/mocha#lib/mocha/impersonating_name.rb:9 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:4 +class Mocha::InStateOrderingConstraint + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:5 + def initialize(state_predicate); end + + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:9 + def allows_invocation_now?; end + + # pkg:gem/mocha#lib/mocha/in_state_ordering_constraint.rb:13 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/inspect.rb:6 +module Mocha::Inspect; end + +# pkg:gem/mocha#lib/mocha/inspect.rb:15 +module Mocha::Inspect::ArrayMethods + # pkg:gem/mocha#lib/mocha/inspect.rb:16 + def mocha_inspect(wrapped: T.unsafe(nil)); end +end + +# pkg:gem/mocha#lib/mocha/inspect.rb:47 +module Mocha::Inspect::DateMethods + # pkg:gem/mocha#lib/mocha/inspect.rb:48 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/inspect.rb:22 +module Mocha::Inspect::HashMethods + # pkg:gem/mocha#lib/mocha/inspect.rb:23 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/inspect.rb:7 +module Mocha::Inspect::ObjectMethods + # pkg:gem/mocha#lib/mocha/inspect.rb:8 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/inspect.rb:41 +module Mocha::Inspect::TimeMethods + # pkg:gem/mocha#lib/mocha/inspect.rb:42 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/instance_method.rb:6 +class Mocha::InstanceMethod < ::Mocha::StubbedMethod + private + + # pkg:gem/mocha#lib/mocha/instance_method.rb:17 + def original_method_owner; end + + # pkg:gem/mocha#lib/mocha/instance_method.rb:9 + def stubbee; end + + # pkg:gem/mocha#lib/mocha/instance_method.rb:13 + def stubbee_method(method_name); end +end + +# Contains adapters that provide built-in support for +Minitest+ and +Test::Unit+. +# +# pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:4 +module Mocha::Integration; end + +# pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:5 +class Mocha::Integration::AssertionCounter + # pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:6 + def initialize(test_case); end + + # pkg:gem/mocha#lib/mocha/integration/assertion_counter.rb:10 + def increment; end +end + +# Contains {Adapter} that integrates Mocha into recent versions of Minitest. +# +# pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:10 +module Mocha::Integration::Minitest + class << self + # pkg:gem/mocha#lib/mocha/integration/minitest.rb:9 + def activate; end + end +end + +# Integrates Mocha into recent versions of Minitest. +# +# See the source code for an example of how to integrate Mocha into a test library. +# +# pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:14 +module Mocha::Integration::Minitest::Adapter + include ::Mocha::ParameterMatchers::Methods + include ::Mocha::Hooks + include ::Mocha::API + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:49 + def after_teardown; end + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:33 + def before_setup; end + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:40 + def before_teardown; end + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:55 + def mocha_test_name; end + + class << self + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:18 + def applicable_to?(minitest_version); end + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:23 + def description; end + + # @private + # + # pkg:gem/mocha#lib/mocha/integration/minitest/adapter.rb:28 + def included(_mod); end + end +end + +# pkg:gem/mocha#lib/mocha/invocation.rb:10 +class Mocha::Invocation + # pkg:gem/mocha#lib/mocha/invocation.rb:13 + def initialize(mock, method_name, arguments = T.unsafe(nil), block = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/invocation.rb:44 + def arguments; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:11 + def block; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:22 + def call(yield_parameters = T.unsafe(nil), return_values = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/invocation.rb:48 + def call_description; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:64 + def full_description; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:11 + def method_name; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:36 + def raised(exception); end + + # pkg:gem/mocha#lib/mocha/invocation.rb:58 + def result_description; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:32 + def returned(value); end + + # pkg:gem/mocha#lib/mocha/invocation.rb:54 + def short_call_description; end + + # pkg:gem/mocha#lib/mocha/invocation.rb:40 + def threw(tag, value); end + + private + + # pkg:gem/mocha#lib/mocha/invocation.rb:70 + def argument_description; end +end + +# pkg:gem/mocha#lib/mocha/logger.rb:6 +class Mocha::Logger + # pkg:gem/mocha#lib/mocha/logger.rb:19 + def warning(message, category: T.unsafe(nil)); end + + class << self + # pkg:gem/mocha#lib/mocha/logger.rb:14 + def logger; end + + # pkg:gem/mocha#lib/mocha/logger.rb:8 + def logger=(_arg0); end + + # pkg:gem/mocha#lib/mocha/logger.rb:10 + def warning(*args, **kwargs); end + end +end + +# pkg:gem/mocha#lib/mocha/method_matcher.rb:4 +class Mocha::MethodMatcher + # pkg:gem/mocha#lib/mocha/method_matcher.rb:7 + def initialize(expected_method_name); end + + # pkg:gem/mocha#lib/mocha/method_matcher.rb:5 + def expected_method_name; end + + # pkg:gem/mocha#lib/mocha/method_matcher.rb:11 + def match?(actual_method_name); end + + # pkg:gem/mocha#lib/mocha/method_matcher.rb:15 + def mocha_inspect; end +end + +# Traditional mock object. +# +# {expects} and {stubs} return an {Expectation} which can be further modified +# by methods on {Expectation}. +# +# {responds_like} and {responds_like_instance_of} both return a {Mock}, and +# can therefore, be chained to the original creation methods in {API}. +# They force the mock to indicate what it is supposed to be mocking, thus +# making it a safer verifying mock. They check that the underlying +responder+ +# will actually respond to the methods being stubbed, throwing a +# +NoMethodError+ upon invocation otherwise. +# +# Stubs and expectations are basically the same thing. A stub is just an +# expectation of zero or more invocations. The {#stubs} method is syntactic +# sugar to make the intent of the test more explicit. +# +# When a method is invoked on a mock object, the mock object searches through +# its expectations from newest to oldest to find one that matches the +# invocation. After the invocation, the matching expectation might stop +# matching further invocations. For example, an +expects(:foo).once+ +# expectation only matches once and will be ignored on future invocations +# while an +expects(:foo).at_least_once+ expectation will always be matched +# against invocations. +# +# However, note that if the expectation that matches the invocation has a +# cardinality of "never", then an unexpected invocation error is reported. +# +# This scheme allows you to: +# +# - Set up default stubs in your the +setup+ method of your test class and +# override some of those stubs in individual tests. +# - Set up different +once+ expectations for the same method with different +# action per invocation. However, it's better to use the +# {Expectation#returns} method with multiple arguments to do this, as +# described below. +# +# However, there are some possible "gotchas" caused by this scheme: +# +# - if you create an expectation and then a stub for the same method, the +# stub will always override the expectation and the expectation will never +# be met. +# - if you create a stub and then an expectation for the same method, the +# expectation will match, and when it stops matching the stub will be used +# instead, possibly masking test failures. +# - if you create different expectations for the same method, they will be +# invoked in the opposite order than that in which they were specified, +# rather than the same order. +# +# The best thing to do is not set up multiple expectations and stubs for the +# same method with exactly the same matchers. Instead, use the +# {Expectation#returns} method with multiple arguments to create multiple +# actions for a method. You can also chain multiple calls to +# {Expectation#returns} and {Expectation#raises} (along with syntactic sugar +# {Expectation#then} if desired). +# +# @example +# object = mock() +# object.stubs(:expected_method).returns(1, 2).then.raises(Exception) +# object.expected_method # => 1 +# object.expected_method # => 2 +# object.expected_method # => raises exception of class Exception1 +# +# If you want to specify more complex ordering or order invocations across +# different mock objects, use the {Expectation#in_sequence} method to +# explicitly define a total or partial ordering of invocations. +# +# pkg:gem/mocha#lib/mocha/mock.rb:81 +class Mocha::Mock + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:279 + def initialize(mockery, assertion_counter, name = T.unsafe(nil), receiver = T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:304 + def __expectations__; end + + # pkg:gem/mocha#lib/mocha/mock.rb:294 + def __expects__(method_name_or_hash, backtrace = T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:364 + def __expire__(origin); end + + # pkg:gem/mocha#lib/mocha/mock.rb:298 + def __singleton_class__; end + + # pkg:gem/mocha#lib/mocha/mock.rb:296 + def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:359 + def __verified__?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:314 + def all_expectations; end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:384 + def any_expectations?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:379 + def ensure_method_not_already_defined(method_name); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:292 + def everything_stubbed; end + + # Adds an expectation that the specified method must be called exactly once with any parameters. + # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # + # @overload def expects(method_name) + # @param [Symbol,String] method_name name of expected method + # @overload def expects(expected_methods_vs_return_values) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {#expects} were called multiple times. + # + # @example Expected method invoked once so no error raised + # object = mock() + # object.expects(:expected_method) + # object.expected_method + # + # @example Expected method not invoked so error raised + # object = mock() + # object.expects(:expected_method) + # # error raised when test completes, because expected_method not called exactly once + # + # @example Expected method invoked twice so error raised + # object = mock() + # object.expects(:expected_method) + # object.expected_method + # object.expected_method # => error raised when expected method invoked second time + # + # @example Setup multiple expectations using +expected_methods_vs_return_values+. + # object = mock() + # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) + # + # # is exactly equivalent to + # + # object = mock() + # object.expects(:expected_method_one).returns(:result_one) + # object.expects(:expected_method_two).returns(:result_two) + # + # pkg:gem/mocha#lib/mocha/mock.rb:116 + def expects(method_name_or_hash, backtrace = T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:325 + def handle_method_call(symbol, arguments, block); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:374 + def inspect; end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:319 + def method_missing(symbol, *arguments, **_arg2, &block); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:369 + def mocha_inspect; end + + # pkg:gem/mocha#lib/mocha/mock.rb:300 + def quacks_like(responder); end + + # pkg:gem/mocha#lib/mocha/mock.rb:301 + def quacks_like_instance_of(responder_class); end + + # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time. + # + # A +NoMethodError+ will be raised if the +responder+ does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed). + # + # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered. + # + # Note that the methods on +responder+ are never actually invoked. + # + # @param [Object, #respond_to?] responder an object used to determine whether {Mock} instance should +#respond_to?+ to an invocation. + # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. + # @see #responds_like_instance_of + # + # @example Normal mocking + # sheep = mock('sheep') + # sheep.expects(:chew) + # sheep.expects(:foo) + # sheep.respond_to?(:chew) # => true + # sheep.respond_to?(:foo) # => true + # sheep.chew + # sheep.foo + # # no error raised + # + # @example Using {#responds_like} with an instance method + # class Sheep + # def chew(grass); end + # end + # + # sheep = mock('sheep') + # sheep.responds_like(Sheep.new) + # sheep.expects(:chew) + # sheep.expects(:foo) + # sheep.respond_to?(:chew) # => true + # sheep.respond_to?(:foo) # => false + # sheep.chew + # sheep.foo # => raises NoMethodError exception + # + # @example Using {#responds_like} with a class method + # class Sheep + # def self.number_of_legs; end + # end + # + # sheep_class = mock('sheep_class') + # sheep_class.responds_like(Sheep) + # sheep_class.stubs(:number_of_legs).returns(4) + # sheep_class.expects(:foo) + # sheep_class.respond_to?(:number_of_legs) # => true + # sheep_class.respond_to?(:foo) # => false + # sheep_class.number_of_legs # => 4 + # sheep_class.foo # => raises NoMethodError exception + # + # pkg:gem/mocha#lib/mocha/mock.rb:241 + def responds_like(responder); end + + # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+. + # + # A +NoMethodError+ will be raised if the responder instance does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed). + # + # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered. + # + # Note that the methods on the responder instance are never actually invoked. + # + # @param [Class] responder_class a class used to determine whether {Mock} instance should +#respond_to?+ to an invocation. + # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. + # @see #responds_like + # + # @example Using {#responds_like_instance_of} + # class Sheep + # def initialize + # raise "some awkward code we don't want to call" + # end + # def chew(grass); end + # end + # + # sheep = mock('sheep') + # sheep.responds_like_instance_of(Sheep) + # sheep.expects(:chew) + # sheep.expects(:foo) + # sheep.respond_to?(:chew) # => true + # sheep.respond_to?(:foo) # => false + # sheep.chew + # sheep.foo # => raises NoMethodError exception + # + # pkg:gem/mocha#lib/mocha/mock.rb:274 + def responds_like_instance_of(responder_class); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:309 + def stub_everything; end + + # Adds an expectation that the specified method may be called any number of times with any parameters. + # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # + # @overload def stubs(method_name) + # @param [Symbol,String] method_name name of stubbed method + # @overload def stubs(stubbed_methods_vs_return_values) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {#stubs} were called multiple times. + # + # @example No error raised however many times stubbed method is invoked + # object = mock() + # object.stubs(:stubbed_method) + # object.stubbed_method + # object.stubbed_method + # # no error raised + # + # @example Setup multiple expectations using +stubbed_methods_vs_return_values+. + # object = mock() + # object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two) + # + # # is exactly equivalent to + # + # object = mock() + # object.stubs(:stubbed_method_one).returns(:result_one) + # object.stubs(:stubbed_method_two).returns(:result_two) + # + # pkg:gem/mocha#lib/mocha/mock.rb:154 + def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end + + # Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them. + # + # @param [Array] method_names names of methods to unstub. + # + # @example Invoking an unstubbed method causes error to be raised + # object = mock('mock') + # object.stubs(:stubbed_method).returns(:result_one) + # object.stubbed_method # => :result_one + # object.unstub(:stubbed_method) + # object.stubbed_method # => unexpected invocation: #.stubbed_method() + # + # @example Unstubbing multiple methods. + # multiplier.unstub(:double, :triple) + # + # # exactly equivalent to + # + # multiplier.unstub(:double) + # multiplier.unstub(:triple) + # + # pkg:gem/mocha#lib/mocha/mock.rb:186 + def unstub(*method_names); end + + private + + # pkg:gem/mocha#lib/mocha/mock.rb:414 + def check_expiry; end + + # pkg:gem/mocha#lib/mocha/mock.rb:408 + def check_responder_responds_to(symbol); end + + # pkg:gem/mocha#lib/mocha/mock.rb:390 + def raise_unexpected_invocation_error(invocation, matching_expectation); end + + # @private + # + # pkg:gem/mocha#lib/mocha/mock.rb:350 + def respond_to_missing?(symbol, _include_all); end +end + +# pkg:gem/mocha#lib/mocha/mockery.rb:18 +class Mocha::Mockery + # pkg:gem/mocha#lib/mocha/mockery.rb:70 + def initialize(assertion_counter); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:132 + def mocha_inspect; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:82 + def mock_impersonating(object); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:86 + def mock_impersonating_any_instance_of(klass); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:120 + def mocks; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:74 + def named_mock(name); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:90 + def new_state_machine(name); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:140 + def on_stubbing(object, method); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:128 + def sequences; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:124 + def state_machines; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:116 + def stubba; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:110 + def teardown(origin = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:78 + def unnamed_mock; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:94 + def verify; end + + private + + # pkg:gem/mocha#lib/mocha/mockery.rb:176 + def add_mock(mock); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:181 + def add_state_machine(state_machine); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:153 + def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:164 + def expectations; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:186 + def reset; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:172 + def satisfied_expectations; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:168 + def unsatisfied_expectations; end + + class << self + # pkg:gem/mocha#lib/mocha/mockery.rb:45 + def instance; end + + # pkg:gem/mocha#lib/mocha/mockery.rb:49 + def setup(assertion_counter); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:59 + def teardown(origin = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:55 + def verify; end + end +end + +# pkg:gem/mocha#lib/mocha/mockery.rb:19 +class Mocha::Mockery::Null < ::Mocha::Mockery + # pkg:gem/mocha#lib/mocha/mockery.rb:24 + def add_mock(*_arg0); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:28 + def add_state_machine(*_arg0); end + + # pkg:gem/mocha#lib/mocha/mockery.rb:32 + def stubba; end + + private + + # pkg:gem/mocha#lib/mocha/mockery.rb:38 + def raise_not_initialized_error; end + + class << self + # pkg:gem/mocha#lib/mocha/mockery.rb:20 + def build; end + end +end + +# pkg:gem/mocha#lib/mocha/name.rb:4 +class Mocha::Name + # pkg:gem/mocha#lib/mocha/name.rb:5 + def initialize(name); end + + # pkg:gem/mocha#lib/mocha/name.rb:9 + def mocha_inspect; end +end + +# Exception raised when Mocha has not been initialized, e.g. outside the +# context of a test. +# +# pkg:gem/mocha#lib/mocha/not_initialized_error.rb:8 +class Mocha::NotInitializedError < ::Mocha::ErrorWithFilteredBacktrace; end + +# Methods added to all objects to allow mocking and stubbing on real (i.e. non-mock) objects. +# +# Both {#expects} and {#stubs} return an {Expectation} which can be further modified by methods on {Expectation}. +# +# pkg:gem/mocha#lib/mocha/object_methods.rb:13 +module Mocha::ObjectMethods + extend ::Mocha::IgnoringWarning + + # pkg:gem/mocha#lib/mocha/object_methods.rb:20 + def _method(_arg0); end + + # Adds an expectation that the specified method must be called exactly once with any parameters. + # + # The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method. + # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # + # @overload def expects(method_name) + # @param [Symbol,String] method_name name of expected method + # @overload def expects(expected_methods_vs_return_values) + # @param [Hash] expected_methods_vs_return_values expected method name symbols as keys and corresponding return values as values - these expectations are setup as if {#expects} were called multiple times. + # + # @example Setting up an expectation on a non-mock object. + # product = Product.new + # product.expects(:save).returns(true) + # assert_equal true, product.save + # + # @example Setting up multiple expectations on a non-mock object. + # product = Product.new + # product.expects(valid?: true, save: true) + # + # # exactly equivalent to + # + # product = Product.new + # product.expects(:valid?).returns(true) + # product.expects(:save).returns(true) + # + # @see Mock#expects + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:85 + def expects(expected_methods_vs_return_values); end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:24 + def mocha(instantiate: T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:33 + def reset_mocha; end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:48 + def stubba_class; end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:38 + def stubba_method; end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:43 + def stubba_object; end + + # @private + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:53 + def stubba_respond_to?(symbol); end + + # Adds an expectation that the specified method may be called any number of times with any parameters. + # + # The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method. + # + # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. + # @raise [StubbingError] if attempting to stub method which is not allowed. + # + # @overload def stubs(method_name) + # @param [Symbol,String] method_name name of stubbed method + # @overload def stubs(stubbed_methods_vs_return_values) + # @param [Hash] stubbed_methods_vs_return_values stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if {#stubs} were called multiple times. + # + # @example Setting up a stubbed methods on a non-mock object. + # product = Product.new + # product.stubs(:save).returns(true) + # assert_equal true, product.save + # + # @example Setting up multiple stubbed methods on a non-mock object. + # product = Product.new + # product.stubs(valid?: true, save: true) + # + # # exactly equivalent to + # + # product = Product.new + # product.stubs(:valid?).returns(true) + # product.stubs(:save).returns(true) + # + # @see Mock#stubs + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:134 + def stubs(stubbed_methods_vs_return_values); end + + # Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them. + # + # Restores the original behaviour of the methods before they were stubbed. This is normally done automatically at the end of each test, but in some circumstances you may want to do it *before* the end of the test. + # + # WARNING: If you {#unstub} a method which still has unsatisfied expectations, you may be removing the only way those expectations can be satisfied. Use {#unstub} with care. + # + # @param [Array] method_names names of methods to unstub. + # + # @example Stubbing and unstubbing a method on a real (non-mock) object. + # multiplier = Multiplier.new + # multiplier.double(2) # => 4 + # multiplier.stubs(:double).raises # new behaviour defined + # multiplier.double(2) # => raises exception + # multiplier.unstub(:double) # original behaviour restored + # multiplier.double(2) # => 4 + # + # @example Unstubbing multiple methods on a real (non-mock) object. + # multiplier.unstub(:double, :triple) + # + # # exactly equivalent to + # + # multiplier.unstub(:double) + # multiplier.unstub(:triple) + # + # pkg:gem/mocha#lib/mocha/object_methods.rb:175 + def unstub(*method_names); end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/object_methods.rb:17 +Mocha::ObjectMethods::JRUBY_ALIAS_SPECIAL_METHODS_WARNING = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/mocha#lib/mocha/object_receiver.rb:4 +class Mocha::ObjectReceiver + # pkg:gem/mocha#lib/mocha/object_receiver.rb:5 + def initialize(object); end + + # pkg:gem/mocha#lib/mocha/object_receiver.rb:9 + def mocks; end +end + +# Matcher classes used as parameters for {Expectation#with} to restrict the parameter values which will match the expectation. Can be nested. Build matcher instances in tests using methods in {Methods}, e.g. {Methods#includes}. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers.rb:5 +module Mocha::ParameterMatchers; end + +# Parameter matcher which combines a number of other matchers using a logical AND. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:32 +class Mocha::ParameterMatchers::AllOf + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:36 + def initialize(*matchers); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:41 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:47 + def mocha_inspect; end +end + +# Parameter matcher which combines a number of other matchers using a logical OR. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:38 +class Mocha::ParameterMatchers::AnyOf + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:42 + def initialize(*matchers); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:47 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:53 + def mocha_inspect; end +end + +# Parameter matcher which always matches whatever the parameters. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:30 +class Mocha::ParameterMatchers::AnyParameters + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:34 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:42 + def mocha_inspect; end +end + +# Parameter matcher which always matches a single parameter. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:27 +class Mocha::ParameterMatchers::Anything + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:31 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:37 + def mocha_inspect; end +end + +# @abstract Include and implement +#matches?+ and +#mocha_inspect+ to define a custom matcher. Also add a suitably named instance method to {Methods} to build an instance of the new matcher c.f. {Methods#equals}. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/base_methods.rb:8 +module Mocha::ParameterMatchers::BaseMethods + # A shorthand way of combining two matchers when both must match. + # + # Returns a new {AllOf} parameter matcher combining two matchers using a logical AND. + # + # This shorthand will not work with an implicit equals match. Instead, an explicit {Equals} matcher should be used. + # + # @param [BaseMethods] other parameter matcher. + # @return [AllOf] parameter matcher. + # + # @see Expectation#with + # + # @example Alternative ways to combine matchers with a logical AND. + # object = mock() + # object.expects(:run).with(all_of(has_key(:foo), has_key(:bar))) + # object.run(foo: 'foovalue', bar: 'barvalue') + # + # # is exactly equivalent to + # + # object.expects(:run).with(has_key(:foo) & has_key(:bar)) + # object.run(foo: 'foovalue', bar: 'barvalue) + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/base_methods.rb:29 + def &(other); end + + # A shorthand way of combining two matchers when at least one must match. + # + # Returns a new +AnyOf+ parameter matcher combining two matchers using a logical OR. + # + # This shorthand will not work with an implicit equals match. Instead, an explicit {Equals} matcher should be used. + # + # @param [BaseMethods] other parameter matcher. + # @return [AnyOf] parameter matcher. + # + # @see Expectation#with + # + # @example Alternative ways to combine matchers with a logical OR. + # object = mock() + # object.expects(:run).with(any_of(has_key(:foo), has_key(:bar))) + # object.run(foo: 'foovalue') + # + # # is exactly equivalent to + # + # object.expects(:run).with(has_key(:foo) | has_key(:bar)) + # object.run(foo: 'foovalue') + # + # @example Using an explicit {Equals} matcher in combination with {#|}. + # object.expects(:run).with(equals(1) | equals(2)) + # object.run(1) # passes + # object.run(2) # passes + # object.run(3) # fails + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/base_methods.rb:59 + def |(other); end +end + +# Parameter matcher which matches when actual parameter equals expected value. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:33 +class Mocha::ParameterMatchers::Equals + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:37 + def initialize(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:48 + def mocha_inspect; end +end + +# Parameter matcher which matches URIs with equivalent query strings. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:33 +class Mocha::ParameterMatchers::EquivalentUri + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:37 + def initialize(uri); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:49 + def mocha_inspect; end + + private + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:56 + def explode(uri); end +end + +# Parameter matcher which matches when actual parameter contains all expected +Hash+ entries. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:35 +class Mocha::ParameterMatchers::HasEntries + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:39 + def initialize(entries, exact: T.unsafe(nil)); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:45 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:56 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter contains expected +Hash+ entry. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:62 +class Mocha::ParameterMatchers::HasEntry + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:66 + def initialize(key, value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:72 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:81 + def mocha_inspect; end + + class << self + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:86 + def parse_option(option); end + end +end + +# Parameter matcher which matches when actual parameter contains +Hash+ entry with expected key. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:33 +class Mocha::ParameterMatchers::HasKey + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:37 + def initialize(key); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:50 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter contains +Hash+ with all expected keys. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:33 +class Mocha::ParameterMatchers::HasKeys + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:37 + def initialize(*keys); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:44 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:54 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter contains +Hash+ entry with expected value. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:33 +class Mocha::ParameterMatchers::HasValue + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:37 + def initialize(value); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:50 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter includes expected values. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:72 +class Mocha::ParameterMatchers::Includes + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:76 + def initialize(*items); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:81 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:99 + def mocha_inspect; end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:10 +module Mocha::ParameterMatchers::InstanceMethods + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:12 + def to_matcher(expectation: T.unsafe(nil), top_level: T.unsafe(nil), last: T.unsafe(nil)); end +end + +# Parameter matcher which matches when actual parameter is an instance of the specified class. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:33 +class Mocha::ParameterMatchers::InstanceOf + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:37 + def initialize(klass); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:48 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter is a specific class. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:34 +class Mocha::ParameterMatchers::IsA + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:38 + def initialize(klass); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:43 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:49 + def mocha_inspect; end +end + +# Parameter matcher which matches when actual parameter is a kind of specified class. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:33 +class Mocha::ParameterMatchers::KindOf + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:37 + def initialize(klass); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:50 + def mocha_inspect; end +end + +# These methods build instances of the {ParameterMatchers} classes which are used with {Expectation#with} to restrict the parameter values. Can be nested, e.g. see {Methods#all_of} examples. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers.rb:7 +module Mocha::ParameterMatchers::Methods + # Matches if +matcher+ does *not* match. + # + # @param [BaseMethods] matcher matcher whose logic to invert. + # @return [Not] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter does not include the value +1+. + # object = mock() + # object.expects(:method_1).with(Not(includes(1))) + # object.method_1([0, 2, 3]) + # # no error raised + # + # @example Actual parameter does include the value +1+. + # object = mock() + # object.expects(:method_1).with(Not(includes(1))) + # object.method_1([0, 1, 2, 3]) + # # error raised, because method_1 was not called with object not including 1 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:27 + def Not(matcher); end + + # Matches if all +matchers+ match. + # + # @param [*Array] matchers parameter matchers. + # @return [AllOf] parameter matcher. + # + # @see Expectation#with + # + # @example All parameter matchers match. + # object = mock() + # object.expects(:method_1).with(all_of(includes(1), includes(3))) + # object.method_1([1, 3]) + # # no error raised + # + # @example One of the parameter matchers does not match. + # object = mock() + # object.expects(:method_1).with(all_of(includes(1), includes(3))) + # object.method_1([1, 2]) + # # error raised, because method_1 was not called with object including 1 and 3 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/all_of.rb:26 + def all_of(*matchers); end + + # Matches if any +matchers+ match. + # + # @param [*Array] matchers parameter matchers. + # @return [AnyOf] parameter matcher. + # + # @see Expectation#with + # + # @example One parameter matcher matches. + # object = mock() + # object.expects(:method_1).with(any_of(1, 3)) + # object.method_1(1) + # # no error raised + # + # @example The other parameter matcher matches. + # object = mock() + # object.expects(:method_1).with(any_of(1, 3)) + # object.method_1(3) + # # no error raised + # + # @example Neither parameter matcher matches. + # object = mock() + # object.expects(:method_1).with(any_of(1, 3)) + # object.method_1(2) + # # error raised, because method_1 was not called with 1 or 3 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_of.rb:32 + def any_of(*matchers); end + + # Matches any parameters. This is used as the default for a newly built expectation. + # + # @return [AnyParameters] parameter matcher. + # + # @see Expectation#with + # + # @example Any parameters will match. + # object = mock() + # object.expects(:method_1).with(any_parameters) + # object.method_1(1, 2, 3, 4) + # # no error raised + # + # object = mock() + # object.expects(:method_1).with(any_parameters) + # object.method_1(5, 6, 7, 8, 9, 0) + # # no error raised + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/any_parameters.rb:24 + def any_parameters; end + + # Matches any object. + # + # @return [Anything] parameter matcher. + # + # @see Expectation#with + # + # @example Any object will match. + # object = mock() + # object.expects(:method_1).with(anything) + # object.method_1('foo') + # object.method_1(789) + # object.method_1(:bar) + # # no error raised + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/anything.rb:21 + def anything; end + + # Matches any +Object+ equalling +value+. + # + # @param [Object] value expected value. + # @return [Equals] parameter matcher. + # + # @see Expectation#with + # @see Object#== + # + # @example Actual parameter equals expected parameter. + # object = mock() + # object.expects(:method_1).with(equals(2)) + # object.method_1(2) + # # no error raised + # + # @example Actual parameter does not equal expected parameter. + # object = mock() + # object.expects(:method_1).with(equals(2)) + # object.method_1(3) + # # error raised, because method_1 was not called with an +Object+ that equals 2 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equals.rb:27 + def equals(value); end + + # Matches a URI without regard to the ordering of parameters in the query string. + # + # @param [String] uri URI to match. + # @return [EquivalentUri] parameter matcher. + # + # @see Expectation#with + # + # @example Actual URI is equivalent. + # object = mock() + # object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2')) + # object.method_1('http://example.com/foo?b=2&a=1') + # # no error raised + # + # @example Actual URI is not equivalent. + # object = mock() + # object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2')) + # object.method_1('http://example.com/foo?a=1&b=3') + # # error raised, because the query parameters were different + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/equivalent_uri.rb:27 + def equivalent_uri(uri); end + + # Matches +Hash+ containing all +entries+. + # + # @param [Hash] entries expected +Hash+ entries. + # @return [HasEntries] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter contains all expected entries. + # object = mock() + # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2)) + # object.method_1('key_1' => 1, 'key_2' => 2, 'key_3' => 3) + # # no error raised + # + # @example Actual parameter does not contain all expected entries. + # object = mock() + # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2)) + # object.method_1('key_1' => 1, 'key_2' => 99) + # # error raised, because method_1 was not called with Hash containing entries: 'key_1' => 1, 'key_2' => 2 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entries.rb:29 + def has_entries(entries); end + + # Matches +Hash+ containing entry with +key+ and +value+. + # + # @overload def has_entry(key, value) + # @param [Object] key key for entry. + # @param [Object] value value for entry. + # @overload def has_entry(single_entry_hash) + # @param [Hash] single_entry_hash +Hash+ with single entry. + # @raise [ArgumentError] if +single_entry_hash+ does not contain exactly one entry. + # + # @return [HasEntry] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter contains expected entry supplied as key and value. + # object = mock() + # object.expects(:method_1).with(has_entry('key_1', 1)) + # object.method_1('key_1' => 1, 'key_2' => 2) + # # no error raised + # + # @example Actual parameter contains expected entry supplied as +Hash+ entry. + # object = mock() + # object.expects(:method_1).with(has_entry('key_1' => 1)) + # object.method_1('key_1' => 1, 'key_2' => 2) + # # no error raised + # + # @example Actual parameter does not contain expected entry supplied as key and value. + # object = mock() + # object.expects(:method_1).with(has_entry('key_1', 1)) + # object.method_1('key_1' => 2, 'key_2' => 1) + # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 + # + # @example Actual parameter does not contain expected entry supplied as +Hash+ entry. + # + # object = mock() + # object.expects(:method_1).with(has_entry('key_1' => 1)) + # object.method_1('key_1' => 2, 'key_2' => 1) + # # error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_entry.rb:46 + def has_entry(*options); end + + # Matches +Hash+ containing +key+. + # + # @param [Object] key expected key. + # @return [HasKey] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter contains entry with expected key. + # object = mock() + # object.expects(:method_1).with(has_key('key_1')) + # object.method_1('key_1' => 1, 'key_2' => 2) + # # no error raised + # + # @example Actual parameter does not contain entry with expected key. + # object = mock() + # object.expects(:method_1).with(has_key('key_1')) + # object.method_1('key_2' => 2) + # # error raised, because method_1 was not called with Hash containing key: 'key_1' + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_key.rb:27 + def has_key(key); end + + # Matches +Hash+ containing +keys+. + # + # @param [*Array] keys expected keys. + # @return [HasKeys] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter contains entry with expected keys. + # object = mock() + # object.expects(:method_1).with(has_keys(:key_1, :key_2)) + # object.method_1(:key_1 => 1, :key_2 => 2, :key_3 => 3) + # # no error raised + # + # @example Actual parameter does not contain all expected keys. + # object = mock() + # object.expects(:method_1).with(has_keys(:key_1, :key_2)) + # object.method_1(:key_2 => 2) + # # error raised, because method_1 was not called with Hash containing key: :key_1 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_keys.rb:27 + def has_keys(*keys); end + + # Matches +Hash+ containing +value+. + # + # @param [Object] value expected value. + # @return [HasValue] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter contains entry with expected value. + # object = mock() + # object.expects(:method_1).with(has_value(1)) + # object.method_1('key_1' => 1, 'key_2' => 2) + # # no error raised + # + # @example Actual parameter does not contain entry with expected value. + # object = mock() + # object.expects(:method_1).with(has_value(1)) + # object.method_1('key_2' => 2) + # # error raised, because method_1 was not called with Hash containing value: 1 + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/has_value.rb:27 + def has_value(value); end + + # Matches any object that responds with +true+ to +include?(item)+ + # for all items. + # + # @param [*Array] items expected items. + # @return [Includes] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter includes all items. + # object = mock() + # object.expects(:method_1).with(includes('foo', 'bar')) + # object.method_1(['foo', 'bar', 'baz']) + # # no error raised + # + # @example Actual parameter does not include all items. + # object.method_1(['foo', 'baz']) + # # error raised, because ['foo', 'baz'] does not include 'bar'. + # + # @example Actual parameter includes item which matches nested matcher. + # object = mock() + # object.expects(:method_1).with(includes(has_key(:key))) + # object.method_1(['foo', 'bar', {key: 'baz'}]) + # # no error raised + # + # @example Actual parameter does not include item matching nested matcher. + # object.method_1(['foo', 'bar', {:other_key => 'baz'}]) + # # error raised, because no element matches `has_key(:key)` matcher + # + # @example Actual parameter is a String including substring. + # object = mock() + # object.expects(:method_1).with(includes('bar')) + # object.method_1('foobarbaz') + # # no error raised + # + # @example Actual parameter is a String not including substring. + # object.method_1('foobaz') + # # error raised, because 'foobaz' does not include 'bar' + # + # @example Actual parameter is a Hash including the given key. + # object = mock() + # object.expects(:method_1).with(includes(:bar)) + # object.method_1({foo: 1, bar: 2}) + # # no error raised + # + # @example Actual parameter is a Hash without the given key. + # object.method_1({foo: 1, baz: 2}) + # # error raised, because hash does not include key 'bar' + # + # @example Actual parameter is a Hash with a key matching the given matcher. + # object = mock() + # object.expects(:method_1).with(includes(regexp_matches(/ar/))) + # object.method_1({'foo' => 1, 'bar' => 2}) + # # no error raised + # + # @example Actual parameter is a Hash no key matching the given matcher. + # object.method_1({'foo' => 1, 'baz' => 3}) + # # error raised, because hash does not include a key matching /ar/ + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/includes.rb:66 + def includes(*items); end + + # Matches any object that is an instance of +klass+ + # + # @param [Class] klass expected class. + # @return [InstanceOf] parameter matcher. + # + # @see Expectation#with + # @see Kernel#instance_of? + # + # @example Actual parameter is an instance of +String+. + # object = mock() + # object.expects(:method_1).with(instance_of(String)) + # object.method_1('string') + # # no error raised + # + # @example Actual parameter is not an instance of +String+. + # object = mock() + # object.expects(:method_1).with(instance_of(String)) + # object.method_1(99) + # # error raised, because method_1 was not called with an instance of String + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/instance_of.rb:27 + def instance_of(klass); end + + # Matches any object that is a +klass+. + # + # @param [Class] klass expected class. + # @return [IsA] parameter matcher. + # + # @see Expectation#with + # @see Kernel#is_a? + # + # @example Actual parameter is a +Integer+. + # object = mock() + # object.expects(:method_1).with(is_a(Integer)) + # object.method_1(99) + # # no error raised + # + # @example Actual parameter is not a +Integer+. + # object = mock() + # object.expects(:method_1).with(is_a(Integer)) + # object.method_1('string') + # # error raised, because method_1 was not called with an Integer + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/is_a.rb:28 + def is_a(klass); end + + # Matches any +Object+ that is a kind of +klass+. + # + # @param [Class] klass expected class. + # @return [KindOf] parameter matcher. + # + # @see Expectation#with + # @see Kernel#kind_of? + # + # @example Actual parameter is a kind of +Integer+. + # object = mock() + # object.expects(:method_1).with(kind_of(Integer)) + # object.method_1(99) + # # no error raised + # + # @example Actual parameter is not a kind of +Integer+. + # object = mock() + # object.expects(:method_1).with(kind_of(Integer)) + # object.method_1('string') + # # error raised, because method_1 was not called with a kind of Integer + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/kind_of.rb:27 + def kind_of(klass); end + + # Matches optional parameters if available. + # + # @param [*Array] matchers matchers for optional parameters. + # @return [Optionally] parameter matcher. + # + # @see Expectation#with + # + # @example Only the two required parameters are supplied and they both match their expected value. + # object = mock() + # object.expects(:method_1).with(1, 2, optionally(3, 4)) + # object.method_1(1, 2) + # # no error raised + # + # @example Both required parameters and one of the optional parameters are supplied and they all match their expected value. + # object = mock() + # object.expects(:method_1).with(1, 2, optionally(3, 4)) + # object.method_1(1, 2, 3) + # # no error raised + # + # @example Both required parameters and both of the optional parameters are supplied and they all match their expected value. + # object = mock() + # object.expects(:method_1).with(1, 2, optionally(3, 4)) + # object.method_1(1, 2, 3, 4) + # # no error raised + # + # @example One of the actual optional parameters does not match the expected value. + # object = mock() + # object.expects(:method_1).with(1, 2, optionally(3, 4)) + # object.method_1(1, 2, 3, 5) + # # error raised, because optional parameters did not match + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:36 + def optionally(*matchers); end + + # Matches any object that matches +regexp+. + # + # @param [Regexp] regexp regular expression to match. + # @return [RegexpMatches] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter is matched by specified regular expression. + # object = mock() + # object.expects(:method_1).with(regexp_matches(/e/)) + # object.method_1('hello') + # # no error raised + # + # @example Actual parameter is not matched by specified regular expression. + # object = mock() + # object.expects(:method_1).with(regexp_matches(/a/)) + # object.method_1('hello') + # # error raised, because method_1 was not called with a parameter that matched the + # # regular expression + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:27 + def regexp_matches(regexp); end + + # @overload def responds_with(message, result) + # Matches any object that responds to +message+ with +result+. To put it another way, it tests the quack, not the duck. + # @param [Symbol] message method to invoke. + # @param [Object] result expected result of sending +message+. + # @overload def responds_with(messages_vs_results) + # Matches any object that responds to all the messages with the corresponding results as specified by +messages_vs_results+. + # @param [Hash] messages_vs_results +Hash+ of messages vs results. + # @raise [ArgumentError] if +messages_vs_results+ does not contain at least one entry. + # + # @return [RespondsWith] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter responds with "FOO" when :upcase is invoked. + # object = mock() + # object.expects(:method_1).with(responds_with(:upcase, "FOO")) + # object.method_1("foo") + # # no error raised, because "foo".upcase == "FOO" + # + # @example Actual parameter does not respond with "FOO" when :upcase is invoked. + # object = mock() + # object.expects(:method_1).with(responds_with(:upcase, "BAR")) + # object.method_1("foo") + # # error raised, because "foo".upcase != "BAR" + # + # @example Actual parameter responds with "FOO" when :upcase is invoked and "oof" when :reverse is invoked. + # object = mock() + # object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof")) + # object.method_1("foo") + # # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof" + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:40 + def responds_with(*options); end + + # Matches any YAML that represents the specified +object+ + # + # @param [Object] object object whose YAML to compare. + # @return [YamlEquivalent] parameter matcher. + # + # @see Expectation#with + # + # @example Actual parameter is YAML equivalent of specified +object+. + # object = mock() + # object.expects(:method_1).with(yaml_equivalent(1, 2, 3)) + # object.method_1("--- \n- 1\n- 2\n- 3\n") + # # no error raised + # + # @example Actual parameter is not YAML equivalent of specified +object+. + # object = mock() + # object.expects(:method_1).with(yaml_equivalent(1, 2, 3)) + # object.method_1("--- \n- 1\n- 2\n") + # # error raised, because method_1 was not called with YAML representing the specified Array + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:27 + def yaml_equivalent(object); end +end + +# Parameter matcher which inverts the logic of the specified matcher using a logical NOT operation. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:33 +class Mocha::ParameterMatchers::Not + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:37 + def initialize(matcher); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/not.rb:48 + def mocha_inspect; end +end + +# Parameter matcher which allows optional parameters to be specified. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:42 +class Mocha::ParameterMatchers::Optionally + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:46 + def initialize(*parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:51 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/optionally.rb:63 + def mocha_inspect; end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:12 +class Mocha::ParameterMatchers::PositionalOrKeywordHash + include ::Mocha::ParameterMatchers::BaseMethods + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:15 + def initialize(expected_value, expectation, last_expected_value); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:21 + def matches?(actual_values); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:33 + def mocha_inspect; end + + private + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:68 + def deprecation_warning(actual, expected); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:84 + def expectation_definition; end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:60 + def extract_actual_value(actual_values); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:76 + def hash_type(hash); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:56 + def last_expected_value_is_positional_hash?; end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:39 + def matches_entries_exactly?(actual_value); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:43 + def matches_last_actual_value?(actual_value); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:80 + def ruby2_keywords_hash?(hash); end + + # pkg:gem/mocha#lib/mocha/parameter_matchers/positional_or_keyword_hash.rb:64 + def same_type_of_hash?(actual, expected); end +end + +# Parameter matcher which matches if specified regular expression matches actual paramter. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:33 +class Mocha::ParameterMatchers::RegexpMatches + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:37 + def initialize(regexp); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/regexp_matches.rb:50 + def mocha_inspect; end +end + +# Parameter matcher which matches if actual parameter returns expected result when specified method is invoked. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:61 +class Mocha::ParameterMatchers::RespondsWith + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:65 + def initialize(message, result); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:71 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/responds_with.rb:77 + def mocha_inspect; end +end + +# Parameter matcher which matches if actual parameter is YAML equivalent of specified object. +# +# pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:33 +class Mocha::ParameterMatchers::YamlEquivalent + include ::Mocha::ParameterMatchers::BaseMethods + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:37 + def initialize(object); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:42 + def matches?(available_parameters); end + + # @private + # + # pkg:gem/mocha#lib/mocha/parameter_matchers/yaml_equivalent.rb:50 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/parameters_matcher.rb:7 +class Mocha::ParametersMatcher + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:8 + def initialize(expected_parameters = T.unsafe(nil), expectation = T.unsafe(nil), &matching_block); end + + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:14 + def match?(actual_parameters = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:36 + def matchers; end + + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:26 + def mocha_inspect; end + + # pkg:gem/mocha#lib/mocha/parameters_matcher.rb:22 + def parameters_match?(actual_parameters); end +end + +# pkg:gem/mocha#lib/mocha/ruby_version.rb:4 +Mocha::RUBY_V27_PLUS = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/mocha#lib/mocha/ruby_version.rb:5 +Mocha::RUBY_V30_PLUS = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/mocha#lib/mocha/ruby_version.rb:6 +Mocha::RUBY_V34_PLUS = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/mocha#lib/mocha/raised_exception.rb:4 +class Mocha::RaisedException + # pkg:gem/mocha#lib/mocha/raised_exception.rb:5 + def initialize(exception); end + + # pkg:gem/mocha#lib/mocha/raised_exception.rb:9 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/return_values.rb:6 +class Mocha::ReturnValues + # pkg:gem/mocha#lib/mocha/return_values.rb:13 + def initialize(*values); end + + # pkg:gem/mocha#lib/mocha/return_values.rb:25 + def +(other); end + + # pkg:gem/mocha#lib/mocha/return_values.rb:17 + def next(invocation); end + + # pkg:gem/mocha#lib/mocha/return_values.rb:11 + def values; end + + # pkg:gem/mocha#lib/mocha/return_values.rb:11 + def values=(_arg0); end + + class << self + # pkg:gem/mocha#lib/mocha/return_values.rb:7 + def build(*values); end + end +end + +# Used to constrain the order in which expectations can occur. +# +# @see API#sequence +# @see Expectation#in_sequence +# +# pkg:gem/mocha#lib/mocha/sequence.rb:8 +class Mocha::Sequence + # @private + # + # pkg:gem/mocha#lib/mocha/sequence.rb:26 + def initialize(name); end + + # @private + # + # pkg:gem/mocha#lib/mocha/sequence.rb:32 + def constrain_as_next_in_sequence(expectation); end + + # @private + # + # pkg:gem/mocha#lib/mocha/sequence.rb:44 + def mocha_inspect; end + + # @private + # + # pkg:gem/mocha#lib/mocha/sequence.rb:39 + def satisfied_to_index?(index); end +end + +# @private +# +# pkg:gem/mocha#lib/mocha/sequence.rb:10 +class Mocha::Sequence::InSequenceOrderingConstraint + # pkg:gem/mocha#lib/mocha/sequence.rb:11 + def initialize(sequence, index); end + + # pkg:gem/mocha#lib/mocha/sequence.rb:16 + def allows_invocation_now?; end + + # pkg:gem/mocha#lib/mocha/sequence.rb:20 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/single_return_value.rb:4 +class Mocha::SingleReturnValue + # pkg:gem/mocha#lib/mocha/single_return_value.rb:5 + def initialize(value); end + + # pkg:gem/mocha#lib/mocha/single_return_value.rb:9 + def evaluate(invocation); end +end + +# A state machine that is used to constrain the order of invocations. +# An invocation can be constrained to occur when a state {#is}, or {#is_not}, active. +# +# pkg:gem/mocha#lib/mocha/state_machine.rb:6 +class Mocha::StateMachine + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:43 + def initialize(name); end + + # Put the {StateMachine} into the +next_state_name+. + # + # @param [String] next_state_name name of new state + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:60 + def become(next_state_name); end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:40 + def current_state; end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:40 + def current_state=(_arg0); end + + # Provides mechanisms to (a) determine whether the {StateMachine} is in a given state; or (b) to change the {StateMachine} into the given state. + # + # @param [String] state_name name of expected/desired state. + # @return [StatePredicate,State] (a) state predicate which, when queried, will indicate whether the {StateMachine} is in the given state; or (b) state which, when activated, will change the {StateMachine} into the given state. + # + # @overload def is(expected_state_name) + # Provides a mechanism to determine whether the {StateMachine} is in the state specified by +expected_state_name+ at some point in the future + # @param [String] expected_state_name name of expected state. + # @return [StatePredicate] state predicate which, when queried, will indicate whether the {StateMachine} is in the state specified by +expected_state_name+ + # + # @overload def is(desired_state_name) + # Provides a mechanism to change the {StateMachine} into the state specified by +desired_state_name+ at some point in the future. + # @param [String] desired_state_name name of desired new state. + # @return [State] state which, when activated, will change the {StateMachine} into the state with the specified +desired_state_name+. + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:78 + def is(state_name); end + + # Provides a mechanism to determine whether the {StateMachine} is *not* in the state specified by +unexpected_state_name+ at some point in the future. + # + # @param [String] unexpected_state_name name of unexpected state. + # @return [StatePredicate] state predicate which, when queried, will indicate whether the {StateMachine} is *not* in the state specified by +unexpected_state_name+. + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:86 + def is_not(unexpected_state_name); end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:91 + def mocha_inspect; end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:37 + def name; end + + # Put the {StateMachine} into the state specified by +initial_state_name+. + # + # @param [String] initial_state_name name of initial state + # @return [StateMachine] state machine, thereby allowing invocations of other {StateMachine} methods to be chained. + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:52 + def starts_as(initial_state_name); end +end + +# Provides a mechanism to change the state of a {StateMachine} at some point in the future. +# +# pkg:gem/mocha#lib/mocha/state_machine.rb:29 +class Mocha::StateMachine::State < ::Mocha::StateMachine::StatePredicate + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:31 + def activate; end +end + +# Provides the ability to determine whether a {StateMachine} is in a specified state at some point in the future. +# +# pkg:gem/mocha#lib/mocha/state_machine.rb:8 +class Mocha::StateMachine::StatePredicate + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:10 + def initialize(state_machine, state, description, &active_check); end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:18 + def active?; end + + # @private + # + # pkg:gem/mocha#lib/mocha/state_machine.rb:23 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/stubbed_method.rb:7 +class Mocha::StubbedMethod + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:13 + def initialize(stubba_object, method_name); end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:69 + def ==(_arg0); end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:48 + def define_new_method; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:41 + def hide_original_method; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:62 + def matches?(other); end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:11 + def method_name; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:33 + def mock; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:58 + def remove_new_method; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:37 + def reset_mocha; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:20 + def stub; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:11 + def stubba_object; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:71 + def to_s; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:25 + def unstub; end + + private + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:77 + def retain_original_visibility(method_owner); end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:83 + def store_original_method_visibility; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:92 + def stub_method_owner; end + + # pkg:gem/mocha#lib/mocha/stubbed_method.rb:87 + def use_prepended_module_for_stub_method; end +end + +# pkg:gem/mocha#lib/mocha/stubbed_method.rb:8 +class Mocha::StubbedMethod::PrependedModule < ::Module; end + +# Exception raised when stubbing a particular method is not allowed. +# +# @see Configuration.prevent +# +# pkg:gem/mocha#lib/mocha/stubbing_error.rb:9 +class Mocha::StubbingError < ::Mocha::ErrorWithFilteredBacktrace; end + +# pkg:gem/mocha#lib/mocha/thrower.rb:4 +class Mocha::Thrower + # pkg:gem/mocha#lib/mocha/thrower.rb:5 + def initialize(tag, object = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/thrower.rb:10 + def evaluate(invocation); end +end + +# pkg:gem/mocha#lib/mocha/thrown_object.rb:4 +class Mocha::ThrownObject + # pkg:gem/mocha#lib/mocha/thrown_object.rb:5 + def initialize(tag, value = T.unsafe(nil)); end + + # pkg:gem/mocha#lib/mocha/thrown_object.rb:10 + def mocha_inspect; end +end + +# pkg:gem/mocha#lib/mocha/yield_parameters.rb:4 +class Mocha::YieldParameters + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:5 + def initialize; end + + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:17 + def add(*parameter_groups); end + + # pkg:gem/mocha#lib/mocha/yield_parameters.rb:9 + def next_invocation; end +end + +# pkg:gem/mocha#lib/mocha/parameter_matchers/instance_methods.rb:26 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + include ::Mocha::ParameterMatchers::InstanceMethods + include ::Mocha::Inspect::ObjectMethods + include ::Mocha::ObjectMethods +end + +class Time + include ::Comparable + include ::Mocha::Inspect::TimeMethods +end 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 00000000..b1ad683f --- /dev/null +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -0,0 +1,147 @@ +# 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`. + + +# pkg:gem/netrc#lib/netrc.rb:3 +class Netrc + # pkg:gem/netrc#lib/netrc.rb:166 + def initialize(path, data); end + + # pkg:gem/netrc#lib/netrc.rb:180 + def [](k); end + + # pkg:gem/netrc#lib/netrc.rb:188 + def []=(k, info); end + + # pkg:gem/netrc#lib/netrc.rb:200 + def delete(key); end + + # pkg:gem/netrc#lib/netrc.rb:211 + def each(&block); end + + # pkg:gem/netrc#lib/netrc.rb:196 + def length; end + + # pkg:gem/netrc#lib/netrc.rb:215 + def new_item(m, l, p); end + + # pkg:gem/netrc#lib/netrc.rb:178 + def new_item_prefix; end + + # pkg:gem/netrc#lib/netrc.rb:178 + def new_item_prefix=(_arg0); end + + # pkg:gem/netrc#lib/netrc.rb:219 + def save; end + + # pkg:gem/netrc#lib/netrc.rb:233 + def unparse; end + + class << self + # pkg:gem/netrc#lib/netrc.rb:42 + def check_permissions(path); end + + # pkg:gem/netrc#lib/netrc.rb:33 + def config; end + + # pkg:gem/netrc#lib/netrc.rb:37 + def configure; end + + # pkg:gem/netrc#lib/netrc.rb:10 + def default_path; end + + # pkg:gem/netrc#lib/netrc.rb:14 + def home_path; end + + # pkg:gem/netrc#lib/netrc.rb:85 + def lex(lines); end + + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/netrc#lib/netrc.rb:51 + def read(path = T.unsafe(nil)); end + + # pkg:gem/netrc#lib/netrc.rb:112 + def skip?(s); end + end +end + +# pkg:gem/netrc#lib/netrc.rb:8 +Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) + +# pkg:gem/netrc#lib/netrc.rb:244 +class Netrc::Entry < ::Struct + # pkg:gem/netrc#lib/netrc.rb:244 + def login; end + + # pkg:gem/netrc#lib/netrc.rb:244 + def login=(_); end + + # pkg:gem/netrc#lib/netrc.rb:244 + def password; end + + # pkg:gem/netrc#lib/netrc.rb:244 + def password=(_); end + + # pkg:gem/netrc#lib/netrc.rb:245 + def to_ary; end + + class << self + # pkg:gem/netrc#lib/netrc.rb:244 + def [](*_arg0); end + + # pkg:gem/netrc#lib/netrc.rb:244 + def inspect; end + + # pkg:gem/netrc#lib/netrc.rb:244 + def keyword_init?; end + + # pkg:gem/netrc#lib/netrc.rb:244 + def members; end + + # pkg:gem/netrc#lib/netrc.rb:244 + def new(*_arg0); end + end +end + +# pkg:gem/netrc#lib/netrc.rb:250 +class Netrc::Error < ::StandardError; end + +# pkg:gem/netrc#lib/netrc.rb:68 +class Netrc::TokenArray < ::Array + # pkg:gem/netrc#lib/netrc.rb:76 + def readto; end + + # pkg:gem/netrc#lib/netrc.rb:69 + def take; end +end + +# pkg:gem/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 +# +# pkg:gem/netrc#lib/netrc.rb:7 +Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/parallel@1.21.0.rbi b/sorbet/rbi/gems/parallel@1.21.0.rbi deleted file mode 100644 index b07874ad..00000000 --- a/sorbet/rbi/gems/parallel@1.21.0.rbi +++ /dev/null @@ -1,113 +0,0 @@ -# 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`. - -module Parallel - extend ::Parallel::ProcessorCount - - class << self - def all?(*args, &block); end - def any?(*args, &block); end - def each(array, options = T.unsafe(nil), &block); end - def each_with_index(array, options = T.unsafe(nil), &block); end - def flat_map(*args, &block); end - def in_processes(options = T.unsafe(nil), &block); end - def in_threads(options = T.unsafe(nil)); end - def map(source, options = T.unsafe(nil), &block); end - def map_with_index(array, options = T.unsafe(nil), &block); end - def worker_number; end - def worker_number=(worker_num); end - - private - - def add_progress_bar!(job_factory, options); end - def call_with_index(item, index, options, &block); end - def create_workers(job_factory, options, &block); end - def extract_count_from_options(options); end - def process_incoming_jobs(read, write, job_factory, options, &block); end - def replace_worker(job_factory, workers, index, options, blk); end - def with_instrumentation(item, index, options); end - def work_direct(job_factory, options, &block); end - def work_in_processes(job_factory, options, &blk); end - def work_in_threads(job_factory, options, &block); end - def worker(job_factory, options, &block); end - end -end - -class Parallel::Break < ::StandardError - def initialize(value = T.unsafe(nil)); end - - def value; end -end - -class Parallel::DeadWorker < ::StandardError; end - -class Parallel::ExceptionWrapper - def initialize(exception); end - - def exception; end -end - -class Parallel::JobFactory - def initialize(source, mutex); end - - def next; end - def pack(item, index); end - def size; end - def unpack(data); end - - private - - def producer?; end - def queue_wrapper(array); end -end - -class Parallel::Kill < ::Parallel::Break; end - -module Parallel::ProcessorCount - def physical_processor_count; end - def processor_count; end -end - -Parallel::Stop = T.let(T.unsafe(nil), Object) - -class Parallel::UndumpableException < ::StandardError - def initialize(original); end - - def backtrace; end -end - -class Parallel::UserInterruptHandler - class << self - def kill(thing); end - def kill_on_ctrl_c(pids, options); end - - private - - def restore_interrupt(old, signal); end - def trap_interrupt(signal); end - end -end - -Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) -Parallel::VERSION = T.let(T.unsafe(nil), String) -Parallel::Version = T.let(T.unsafe(nil), String) - -class Parallel::Worker - def initialize(read, write, pid); end - - def close_pipes; end - def pid; end - def read; end - def stop; end - def thread; end - def thread=(_arg0); end - def work(data); end - def write; end - - private - - def wait; end -end diff --git a/sorbet/rbi/gems/parallel@2.1.0.rbi b/sorbet/rbi/gems/parallel@2.1.0.rbi new file mode 100644 index 00000000..f785286c --- /dev/null +++ b/sorbet/rbi/gems/parallel@2.1.0.rbi @@ -0,0 +1,321 @@ +# 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`. + + +# pkg:gem/parallel#lib/parallel/version.rb:2 +module Parallel + class << self + # pkg:gem/parallel#lib/parallel.rb:256 + def all?(*args, &block); end + + # pkg:gem/parallel#lib/parallel.rb:251 + def any?(*args, &block); end + + # pkg:gem/parallel#lib/parallel.rb:247 + def each(array, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:261 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:320 + def filter_map(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/parallel#lib/parallel.rb:316 + def flat_map(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/parallel#lib/parallel.rb:241 + def in_processes(options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:225 + def in_threads(options = T.unsafe(nil)); end + + # pkg:gem/parallel#lib/parallel.rb:265 + def map(source, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:312 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # pkg:gem/parallel#lib/parallel.rb:325 + def physical_processor_count; end + + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling + # + # pkg:gem/parallel#lib/parallel.rb:355 + def processor_count; end + + # pkg:gem/parallel#lib/parallel.rb:359 + def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # pkg:gem/parallel#lib/parallel.rb:364 + def worker_number=(worker_num); end + + private + + # pkg:gem/parallel#lib/parallel.rb:397 + def add_progress_bar!(job_factory, options); end + + # pkg:gem/parallel#lib/parallel.rb:738 + def available_processor_count; end + + # pkg:gem/parallel#lib/parallel.rb:686 + def call_with_index(item, index, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:616 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # pkg:gem/parallel#lib/parallel.rb:676 + def extract_count_from_options(options); end + + # pkg:gem/parallel#lib/parallel.rb:704 + def instrument_finish(item, index, result, options); end + + # yield results in the order of the input items + # needs to use `options` to store state between executions + # needs to use `done` index since a nil result would also be valid + # + # pkg:gem/parallel#lib/parallel.rb:713 + def instrument_finish_in_order(item, index, result, options); end + + # pkg:gem/parallel#lib/parallel.rb:733 + def instrument_start(item, index, options); end + + # pkg:gem/parallel#lib/parallel.rb:370 + def physical_processor_count_windows; end + + # pkg:gem/parallel#lib/parallel.rb:651 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:526 + def ractor_build(use_port); end + + # pkg:gem/parallel#lib/parallel.rb:547 + def ractor_result(item, index, result, results, results_mutex, options); end + + # pkg:gem/parallel#lib/parallel.rb:552 + def ractor_stop(ractor); end + + # pkg:gem/parallel#lib/parallel.rb:604 + def replace_worker(job_factory, workers, index, options, blk); end + + # pkg:gem/parallel#lib/parallel.rb:391 + def run(command); end + + # pkg:gem/parallel#lib/parallel.rb:697 + def with_instrumentation(item, index, options); end + + # pkg:gem/parallel#lib/parallel.rb:422 + def work_direct(job_factory, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:556 + def work_in_processes(job_factory, options, &blk); end + + # pkg:gem/parallel#lib/parallel.rb:466 + def work_in_ractors(job_factory, options); end + + # pkg:gem/parallel#lib/parallel.rb:441 + def work_in_threads(job_factory, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:624 + def worker(job_factory, options, &block); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:12 +class Parallel::Break < ::StandardError + # pkg:gem/parallel#lib/parallel.rb:15 + def initialize(value = T.unsafe(nil)); end + + # marshal_dump that is used for ruby exceptions + # avoid dumping the cause since nobody needs that and it can include undumpable exceptions + # + # pkg:gem/parallel#lib/parallel.rb:22 + def _dump(_depth); end + + # pkg:gem/parallel#lib/parallel.rb:13 + def value; end + + class << self + # marshal_load that is used for ruby exceptions + # + # pkg:gem/parallel#lib/parallel.rb:27 + def _load(data); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:9 +class Parallel::DeadWorker < ::StandardError; end + +# pkg:gem/parallel#lib/parallel.rb:44 +class Parallel::ExceptionWrapper + # pkg:gem/parallel#lib/parallel.rb:47 + def initialize(exception); end + + # pkg:gem/parallel#lib/parallel.rb:45 + def exception; end +end + +# pkg:gem/parallel#lib/parallel.rb:111 +class Parallel::JobFactory + # pkg:gem/parallel#lib/parallel.rb:112 + def initialize(source, mutex); end + + # pkg:gem/parallel#lib/parallel.rb:120 + def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # pkg:gem/parallel#lib/parallel.rb:149 + def pack(item, index); end + + # pkg:gem/parallel#lib/parallel.rb:139 + def size; end + + # unpack item that is sent to workers + # + # pkg:gem/parallel#lib/parallel.rb:154 + def unpack(data); end + + private + + # pkg:gem/parallel#lib/parallel.rb:160 + def producer?; end + + # pkg:gem/parallel#lib/parallel.rb:164 + def queue_wrapper(array); end +end + +# pkg:gem/parallel#lib/parallel.rb:32 +class Parallel::Kill < ::Parallel::Break; end + +# Pluggable wire serializers. Each must respond to `dump(data, io)` / +# `load(io)` (used directly by Worker) and `dump(data)` / `load(string)` +# (used by wrappers like Hmac). +# +# pkg:gem/parallel#lib/parallel/serializer.rb:9 +module Parallel::Serializer; end + +# Wraps any inner serializer with a length-prefixed HMAC-SHA256 frame keyed +# on a per-worker secret generated before fork. Forged frames from a +# pipe-injector fail verification. +# +# pkg:gem/parallel#lib/parallel/serializer.rb:17 +class Parallel::Serializer::Hmac + # SHA256 + # + # pkg:gem/parallel#lib/parallel/serializer.rb:22 + def initialize(inner: T.unsafe(nil), secret: T.unsafe(nil)); end + + # pkg:gem/parallel#lib/parallel/serializer.rb:27 + def dump(data, io); end + + # pkg:gem/parallel#lib/parallel/serializer.rb:33 + def load(io); end +end + +# 32-bit big-endian unsigned int +# +# pkg:gem/parallel#lib/parallel/serializer.rb:19 +Parallel::Serializer::Hmac::LENGTH_BYTES = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parallel#lib/parallel/serializer.rb:18 +Parallel::Serializer::Hmac::LENGTH_FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel/serializer.rb:20 +Parallel::Serializer::Hmac::MAC_BYTES = T.let(T.unsafe(nil), Integer) + +# Raw Marshal. Fast but trusts anything written to the pipe — a same-UID +# attacker that reopens /proc//fd/ can inject Marshal gadgets (RCE). +# +# pkg:gem/parallel#lib/parallel/serializer.rb:12 +Parallel::Serializer::Marshal = Marshal + +# pkg:gem/parallel#lib/parallel.rb:7 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# pkg:gem/parallel#lib/parallel.rb:35 +class Parallel::UndumpableException < ::StandardError + # pkg:gem/parallel#lib/parallel.rb:38 + def initialize(original); end + + # pkg:gem/parallel#lib/parallel.rb:36 + def backtrace; end +end + +# pkg:gem/parallel#lib/parallel.rb:169 +class Parallel::UserInterruptHandler + class << self + # pkg:gem/parallel#lib/parallel.rb:194 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # pkg:gem/parallel#lib/parallel.rb:174 + def kill_on_ctrl_c(pids, options); end + + private + + # pkg:gem/parallel#lib/parallel.rb:218 + def restore_interrupt(old, signal); end + + # pkg:gem/parallel#lib/parallel.rb:203 + def trap_interrupt(signal); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:170 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parallel#lib/parallel/version.rb:3 +Parallel::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel/version.rb:3 +Parallel::Version = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel.rb:63 +class Parallel::Worker + # pkg:gem/parallel#lib/parallel.rb:67 + def initialize(read, write, pid, serializer); 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 + # + # pkg:gem/parallel#lib/parallel.rb:81 + def close_pipes; end + + # pkg:gem/parallel#lib/parallel.rb:64 + def pid; end + + # pkg:gem/parallel#lib/parallel.rb:64 + def read; end + + # pkg:gem/parallel#lib/parallel.rb:74 + def stop; end + + # pkg:gem/parallel#lib/parallel.rb:65 + def thread; end + + # pkg:gem/parallel#lib/parallel.rb:65 + def thread=(_arg0); end + + # pkg:gem/parallel#lib/parallel.rb:86 + def work(data); end + + # pkg:gem/parallel#lib/parallel.rb:64 + def write; end + + private + + # pkg:gem/parallel#lib/parallel.rb:104 + def wait; end +end diff --git a/sorbet/rbi/gems/parser@3.1.0.0.rbi b/sorbet/rbi/gems/parser@3.1.0.0.rbi deleted file mode 100644 index 5aed2536..00000000 --- a/sorbet/rbi/gems/parser@3.1.0.0.rbi +++ /dev/null @@ -1,1761 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parser` gem. -# Please instead update this file by running `bin/tapioca gem parser`. - -module Parser - class << self - private - - def warn_syntax_deviation(feature, version); end - end -end - -module Parser::AST; end - -class Parser::AST::Node < ::AST::Node - def assign_properties(properties); end - def loc; end - def location; end -end - -class Parser::AST::Processor < ::AST::Processor - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_argument(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_blockarg_expr(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_class(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_find_pattern(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_mlhs(node); end - def on_module(node); end - def on_next(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_redo(node); end - def on_regexp(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_restarg_expr(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_super(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_var(node); end - def on_vasgn(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def process_argument_node(node); end - def process_regular_node(node); end - def process_var_asgn_node(node); end - def process_variable_node(node); end -end - -class Parser::Base < ::Racc::Parser - def initialize(builder = T.unsafe(nil)); end - - def builder; end - def context; end - def current_arg_stack; end - def diagnostics; end - def lexer; end - def max_numparam_stack; end - def parse(source_buffer); end - def parse_with_comments(source_buffer); end - def pattern_hash_keys; end - def pattern_variables; end - def reset; end - def source_buffer; end - def static_env; end - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - private - - def check_kwarg_name(name_t); end - def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end - def next_token; end - def on_error(error_token_id, error_value, value_stack); end - - class << self - def default_parser; end - def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - def parse_file(filename); end - def parse_file_with_comments(filename); end - def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - private - - def setup_source_buffer(file, line, string, encoding); end - end -end - -module Parser::Builders; end - -class Parser::Builders::Default - def initialize; end - - def __ENCODING__(__ENCODING__t); end - def __FILE__(__FILE__t); end - def __LINE__(__LINE__t); end - def accessible(node); end - def alias(alias_t, to, from); end - def arg(name_t); end - def arg_expr(expr); end - def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end - def array(begin_t, elements, end_t); end - def array_pattern(lbrack_t, elements, rbrack_t); end - def assign(lhs, eql_t, rhs); end - def assignable(node); end - def associate(begin_t, pairs, end_t); end - def attr_asgn(receiver, dot_t, selector_t); end - def back_ref(token); end - def begin(begin_t, body, end_t); end - def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - def begin_keyword(begin_t, body, end_t); end - def binary_op(receiver, operator_t, arg); end - def block(method_call, begin_t, args, body, end_t); end - def block_pass(amper_t, arg); end - def blockarg(amper_t, name_t); end - def blockarg_expr(amper_t, expr); end - def call_lambda(lambda_t); end - def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - def call_type_for_dot(dot_t); end - def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end - def character(char_t); end - def complex(complex_t); end - def compstmt(statements); end - def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - def condition_mod(if_true, if_false, cond_t, cond); end - def const(name_t); end - def const_fetch(scope, t_colon2, name_t); end - def const_global(t_colon3, name_t); end - def const_op_assignable(node); end - def const_pattern(const, ldelim_t, pattern, rdelim_t); end - def cvar(token); end - def dedent_string(node, dedent_level); end - def def_class(class_t, name, lt_t, superclass, body, end_t); end - def def_endless_method(def_t, name_t, args, assignment_t, body); end - def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - def def_method(def_t, name_t, args, body, end_t); end - def def_module(module_t, name, body, end_t); end - def def_sclass(class_t, lshft_t, expr, body, end_t); end - def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end - def emit_file_line_as_literals; end - def emit_file_line_as_literals=(_arg0); end - def false(false_t); end - def find_pattern(lbrack_t, elements, rbrack_t); end - def float(float_t); end - def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - def forward_arg(dots_t); end - def forward_only_args(begin_t, dots_t, end_t); end - def forwarded_args(dots_t); end - def gvar(token); end - def hash_pattern(lbrace_t, kwargs, rbrace_t); end - def ident(token); end - def if_guard(if_t, if_body); end - def in_match(lhs, in_t, rhs); end - def in_pattern(in_t, pattern, guard, then_t, body); end - def index(receiver, lbrack_t, indexes, rbrack_t); end - def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end - def integer(integer_t); end - def ivar(token); end - def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - def kwarg(name_t); end - def kwnilarg(dstar_t, nil_t); end - def kwoptarg(name_t, value); end - def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end - def kwsplat(dstar_t, arg); end - def logical_op(type, lhs, op_t, rhs); end - def loop(type, keyword_t, cond, do_t, body, end_t); end - def loop_mod(type, body, keyword_t, cond); end - def match_alt(left, pipe_t, right); end - def match_as(value, assoc_t, as); end - def match_hash_var(name_t); end - def match_hash_var_from_str(begin_t, strings, end_t); end - def match_label(label_type, label); end - def match_nil_pattern(dstar_t, nil_t); end - def match_op(receiver, match_t, arg); end - def match_pair(label_type, label, value); end - def match_pattern(lhs, match_t, rhs); end - def match_pattern_p(lhs, match_t, rhs); end - def match_rest(star_t, name_t = T.unsafe(nil)); end - def match_var(name_t); end - def match_with_trailing_comma(match, comma_t); end - def multi_assign(lhs, eql_t, rhs); end - def multi_lhs(begin_t, items, end_t); end - def nil(nil_t); end - def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - def nth_ref(token); end - def numargs(max_numparam); end - def objc_kwarg(kwname_t, assoc_t, name_t); end - def objc_restarg(star_t, name = T.unsafe(nil)); end - def objc_varargs(pair, rest_of_varargs); end - def op_assign(lhs, op_t, rhs); end - def optarg(name_t, eql_t, value); end - def pair(key, assoc_t, value); end - def pair_keyword(key_t, value); end - def pair_label(key_t); end - def pair_list_18(list); end - def pair_quoted(begin_t, parts, end_t, value); end - def parser; end - def parser=(_arg0); end - def pin(pin_t, var); end - def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - def procarg0(arg); end - def range_exclusive(lhs, dot3_t, rhs); end - def range_inclusive(lhs, dot2_t, rhs); end - def rational(rational_t); end - def regexp_compose(begin_t, parts, end_t, options); end - def regexp_options(regopt_t); end - def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - def restarg(star_t, name_t = T.unsafe(nil)); end - def restarg_expr(star_t, expr = T.unsafe(nil)); end - def self(token); end - def shadowarg(name_t); end - def splat(star_t, arg = T.unsafe(nil)); end - def string(string_t); end - def string_compose(begin_t, parts, end_t); end - def string_internal(string_t); end - def symbol(symbol_t); end - def symbol_compose(begin_t, parts, end_t); end - def symbol_internal(symbol_t); end - def symbols_compose(begin_t, parts, end_t); end - def ternary(cond, question_t, if_true, colon_t, if_false); end - def true(true_t); end - def unary_num(unary_t, numeric); end - def unary_op(op_t, receiver); end - def undef_method(undef_t, names); end - def unless_guard(unless_t, unless_body); end - def when(when_t, patterns, then_t, body); end - def word(parts); end - def words_compose(begin_t, parts, end_t); end - def xstring_compose(begin_t, parts, end_t); end - - private - - def arg_name_collides?(this_name, that_name); end - def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - def binary_op_map(left_e, op_t, right_e); end - def block_map(receiver_l, begin_t, end_t); end - def check_assignment_to_numparam(name, loc); end - def check_condition(cond); end - def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - def check_duplicate_args(args, map = T.unsafe(nil)); end - def check_duplicate_pattern_key(name, loc); end - def check_duplicate_pattern_variable(name, loc); end - def check_lvar_name(name, loc); end - def check_reserved_for_numparam(name, loc); end - def collapse_string_parts?(parts); end - def collection_map(begin_t, parts, end_t); end - def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - def constant_map(scope, colon2_t, name_t); end - def definition_map(keyword_t, operator_t, name_t, end_t); end - def delimited_string_map(string_t); end - def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - def expr_map(loc); end - def for_map(keyword_t, in_t, begin_t, end_t); end - def guard_map(keyword_t, guard_body_e); end - def index_map(receiver_e, lbrack_t, rbrack_t); end - def join_exprs(left_expr, right_expr); end - def keyword_map(keyword_t, begin_t, args, end_t); end - def keyword_mod_map(pre_e, keyword_t, post_e); end - def kwarg_map(name_t, value_e = T.unsafe(nil)); end - def kwargs?(node); end - def loc(token); end - def module_definition_map(keyword_t, name_e, operator_t, end_t); end - def n(type, children, source_map); end - def n0(type, source_map); end - def numeric(kind, token); end - def pair_keyword_map(key_t, value_e); end - def pair_quoted_map(begin_t, end_t, value_e); end - def prefix_string_map(symbol); end - def range_map(start_e, op_t, end_e); end - def regexp_map(begin_t, end_t, options_e); end - def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - def rewrite_hash_args_to_kwargs(args); end - def send_binary_op_map(lhs_e, selector_t, rhs_e); end - def send_index_map(receiver_e, lbrack_t, rbrack_t); end - def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - def send_unary_op_map(selector_t, arg_e); end - def static_regexp(parts, options); end - def static_regexp_node(node); end - def static_string(nodes); end - def string_map(begin_t, parts, end_t); end - def string_value(token); end - def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - def token_map(token); end - def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - def unquoted_map(token); end - def validate_definee(definee); end - def validate_no_forward_arg_after_restarg(args); end - def value(token); end - def var_send_map(variable_e); end - def variable_map(name_t); end - - class << self - def emit_arg_inside_procarg0; end - def emit_arg_inside_procarg0=(_arg0); end - def emit_encoding; end - def emit_encoding=(_arg0); end - def emit_forward_arg; end - def emit_forward_arg=(_arg0); end - def emit_index; end - def emit_index=(_arg0); end - def emit_kwargs; end - def emit_kwargs=(_arg0); end - def emit_lambda; end - def emit_lambda=(_arg0); end - def emit_match_pattern; end - def emit_match_pattern=(_arg0); end - def emit_procarg0; end - def emit_procarg0=(_arg0); end - def modernize; end - end -end - -class Parser::ClobberingError < ::RuntimeError; end - -class Parser::Context - def initialize; end - - def in_argdef; end - def in_argdef=(_arg0); end - def in_block; end - def in_block=(_arg0); end - def in_class; end - def in_class=(_arg0); end - def in_def; end - def in_def=(_arg0); end - def in_defined; end - def in_defined=(_arg0); end - def in_dynamic_block?; end - def in_kwarg; end - def in_kwarg=(_arg0); end - def in_lambda; end - def in_lambda=(_arg0); end - def reset; end -end - -Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) - -class Parser::CurrentArgStack - def initialize; end - - def empty?; end - def pop; end - def push(value); end - def reset; end - def set(value); end - def stack; end - def top; end -end - -Parser::CurrentRuby = Parser::Ruby31 - -module Parser::Deprecation - def warn_of_deprecation; end - def warned_of_deprecation=(_arg0); end -end - -class Parser::Diagnostic - def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end - - def arguments; end - def highlights; end - def level; end - def location; end - def message; end - def reason; end - def render; end - - private - - def first_line_only(range); end - def last_line_only(range); end - def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end -end - -class Parser::Diagnostic::Engine - def initialize(consumer = T.unsafe(nil)); end - - def all_errors_are_fatal; end - def all_errors_are_fatal=(_arg0); end - def consumer; end - def consumer=(_arg0); end - def ignore_warnings; end - def ignore_warnings=(_arg0); end - def process(diagnostic); end - - protected - - def ignore?(diagnostic); end - def raise?(diagnostic); end -end - -Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) - -class Parser::Lexer - def initialize(version); end - - def advance; end - def cmdarg; end - def cmdarg=(_arg0); end - def cmdarg_stack; end - def command_start; end - def command_start=(_arg0); end - def comments; end - def comments=(_arg0); end - def cond; end - def cond=(_arg0); end - def cond_stack; end - def context; end - def context=(_arg0); end - def dedent_level; end - def diagnostics; end - def diagnostics=(_arg0); end - def encoding; end - def force_utf32; end - def force_utf32=(_arg0); end - def lambda_stack; end - def paren_nest; end - def pop_cmdarg; end - def pop_cond; end - def push_cmdarg; end - def push_cond; end - def reset(reset_state = T.unsafe(nil)); end - def source_buffer; end - def source_buffer=(source_buffer); end - def state; end - def state=(state); end - def static_env; end - def static_env=(_arg0); end - def tokens; end - def tokens=(_arg0); end - - protected - - def arg_or_cmdarg(cmd_state); end - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - def emit_do(do_block = T.unsafe(nil)); end - def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - def encode_escape(ord); end - def eof_codepoint?(point); end - def literal; end - def next_state_for_literal(literal); end - def pop_literal; end - def push_literal(*args); end - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - def stack_pop; end - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - def version?(*versions); end - - class << self - def lex_en_expr_arg; end - def lex_en_expr_arg=(_arg0); end - def lex_en_expr_beg; end - def lex_en_expr_beg=(_arg0); end - def lex_en_expr_cmdarg; end - def lex_en_expr_cmdarg=(_arg0); end - def lex_en_expr_dot; end - def lex_en_expr_dot=(_arg0); end - def lex_en_expr_end; end - def lex_en_expr_end=(_arg0); end - def lex_en_expr_endarg; end - def lex_en_expr_endarg=(_arg0); end - def lex_en_expr_endfn; end - def lex_en_expr_endfn=(_arg0); end - def lex_en_expr_fname; end - def lex_en_expr_fname=(_arg0); end - def lex_en_expr_labelarg; end - def lex_en_expr_labelarg=(_arg0); end - def lex_en_expr_mid; end - def lex_en_expr_mid=(_arg0); end - def lex_en_expr_value; end - def lex_en_expr_value=(_arg0); end - def lex_en_expr_variable; end - def lex_en_expr_variable=(_arg0); end - def lex_en_interp_backslash_delimited; end - def lex_en_interp_backslash_delimited=(_arg0); end - def lex_en_interp_backslash_delimited_words; end - def lex_en_interp_backslash_delimited_words=(_arg0); end - def lex_en_interp_string; end - def lex_en_interp_string=(_arg0); end - def lex_en_interp_words; end - def lex_en_interp_words=(_arg0); end - def lex_en_leading_dot; end - def lex_en_leading_dot=(_arg0); end - def lex_en_line_begin; end - def lex_en_line_begin=(_arg0); end - def lex_en_line_comment; end - def lex_en_line_comment=(_arg0); end - def lex_en_plain_backslash_delimited; end - def lex_en_plain_backslash_delimited=(_arg0); end - def lex_en_plain_backslash_delimited_words; end - def lex_en_plain_backslash_delimited_words=(_arg0); end - def lex_en_plain_string; end - def lex_en_plain_string=(_arg0); end - def lex_en_plain_words; end - def lex_en_plain_words=(_arg0); end - def lex_en_regexp_modifiers; end - def lex_en_regexp_modifiers=(_arg0); end - def lex_error; end - def lex_error=(_arg0); end - def lex_start; end - def lex_start=(_arg0); end - - private - - def _lex_eof_trans; end - def _lex_eof_trans=(_arg0); end - def _lex_from_state_actions; end - def _lex_from_state_actions=(_arg0); end - def _lex_index_offsets; end - def _lex_index_offsets=(_arg0); end - def _lex_indicies; end - def _lex_indicies=(_arg0); end - def _lex_key_spans; end - def _lex_key_spans=(_arg0); end - def _lex_to_state_actions; end - def _lex_to_state_actions=(_arg0); end - def _lex_trans_actions; end - def _lex_trans_actions=(_arg0); end - def _lex_trans_keys; end - def _lex_trans_keys=(_arg0); end - def _lex_trans_targs; end - def _lex_trans_targs=(_arg0); end - end -end - -class Parser::Lexer::Dedenter - def initialize(dedent_level); end - - def dedent(string); end - def interrupt; end -end - -Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) -Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) -Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) -Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) -Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) - -class Parser::Lexer::Literal - def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - - def backslash_delimited?; end - def dedent_level; end - def end_interp_brace_and_try_closing; end - def extend_content; end - def extend_space(ts, te); end - def extend_string(string, ts, te); end - def flush_string; end - def heredoc?; end - def heredoc_e; end - def infer_indent_level(line); end - def interpolate?; end - def munge_escape?(character); end - def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - def plain_heredoc?; end - def regexp?; end - def saved_herebody_s; end - def saved_herebody_s=(_arg0); end - def squiggly_heredoc?; end - def start_interp_brace; end - def str_s; end - def supports_line_continuation_via_slash?; end - def type; end - def words?; end - - protected - - def clear_buffer; end - def coerce_encoding(string); end - def delimiter?(delimiter); end - def emit(token, type, s, e); end - def emit_start_tok; end -end - -Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) -Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) -Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) -Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) -Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) - -class Parser::Lexer::StackState - def initialize(name); end - - def active?; end - def clear; end - def empty?; end - def inspect; end - def lexpop; end - def pop; end - def push(bit); end - def to_s; end -end - -Parser::MESSAGES = T.let(T.unsafe(nil), Hash) - -class Parser::MaxNumparamStack - def initialize; end - - def empty?; end - def has_numparams?; end - def has_ordinary_params!; end - def has_ordinary_params?; end - def pop; end - def push(static:); end - def register(numparam); end - def stack; end - def top; end - - private - - def set(value); end -end - -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) - -module Parser::Messages - class << self - def compile(reason, arguments); end - end -end - -module Parser::Meta; end -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) - -class Parser::Rewriter < ::Parser::AST::Processor - extend ::Parser::Deprecation - - def initialize(*_arg0); end - - def assignment?(node); end - def insert_after(range, content); end - def insert_before(range, content); end - def remove(range); end - def replace(range, content); end - def rewrite(source_buffer, ast); end - def wrap(range, before, after); end -end - -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -class Parser::Ruby31 < ::Parser::Base - def _reduce_1(val, _values, result); end - def _reduce_10(val, _values, result); end - def _reduce_100(val, _values, result); end - def _reduce_102(val, _values, result); end - def _reduce_103(val, _values, result); end - def _reduce_104(val, _values, result); end - def _reduce_105(val, _values, result); end - def _reduce_106(val, _values, result); end - def _reduce_107(val, _values, result); end - def _reduce_108(val, _values, result); end - def _reduce_109(val, _values, result); end - def _reduce_11(val, _values, result); end - def _reduce_110(val, _values, result); end - def _reduce_111(val, _values, result); end - def _reduce_112(val, _values, result); end - def _reduce_113(val, _values, result); end - def _reduce_114(val, _values, result); end - def _reduce_115(val, _values, result); end - def _reduce_116(val, _values, result); end - def _reduce_117(val, _values, result); end - def _reduce_118(val, _values, result); end - def _reduce_119(val, _values, result); end - def _reduce_12(val, _values, result); end - def _reduce_120(val, _values, result); end - def _reduce_121(val, _values, result); end - def _reduce_122(val, _values, result); end - def _reduce_123(val, _values, result); end - def _reduce_124(val, _values, result); end - def _reduce_125(val, _values, result); end - def _reduce_127(val, _values, result); end - def _reduce_128(val, _values, result); end - def _reduce_129(val, _values, result); end - def _reduce_13(val, _values, result); end - def _reduce_135(val, _values, result); end - def _reduce_137(val, _values, result); end - def _reduce_138(val, _values, result); end - def _reduce_139(val, _values, result); end - def _reduce_14(val, _values, result); end - def _reduce_15(val, _values, result); end - def _reduce_16(val, _values, result); end - def _reduce_18(val, _values, result); end - def _reduce_19(val, _values, result); end - def _reduce_2(val, _values, result); end - def _reduce_20(val, _values, result); end - def _reduce_21(val, _values, result); end - def _reduce_211(val, _values, result); end - def _reduce_212(val, _values, result); end - def _reduce_213(val, _values, result); end - def _reduce_214(val, _values, result); end - def _reduce_215(val, _values, result); end - def _reduce_216(val, _values, result); end - def _reduce_217(val, _values, result); end - def _reduce_218(val, _values, result); end - def _reduce_219(val, _values, result); end - def _reduce_22(val, _values, result); end - def _reduce_220(val, _values, result); end - def _reduce_221(val, _values, result); end - def _reduce_222(val, _values, result); end - def _reduce_223(val, _values, result); end - def _reduce_224(val, _values, result); end - def _reduce_225(val, _values, result); end - def _reduce_226(val, _values, result); end - def _reduce_227(val, _values, result); end - def _reduce_228(val, _values, result); end - def _reduce_229(val, _values, result); end - def _reduce_23(val, _values, result); end - def _reduce_230(val, _values, result); end - def _reduce_231(val, _values, result); end - def _reduce_232(val, _values, result); end - def _reduce_233(val, _values, result); end - def _reduce_234(val, _values, result); end - def _reduce_235(val, _values, result); end - def _reduce_236(val, _values, result); end - def _reduce_237(val, _values, result); end - def _reduce_238(val, _values, result); end - def _reduce_24(val, _values, result); end - def _reduce_240(val, _values, result); end - def _reduce_241(val, _values, result); end - def _reduce_242(val, _values, result); end - def _reduce_243(val, _values, result); end - def _reduce_244(val, _values, result); end - def _reduce_245(val, _values, result); end - def _reduce_246(val, _values, result); end - def _reduce_247(val, _values, result); end - def _reduce_248(val, _values, result); end - def _reduce_249(val, _values, result); end - def _reduce_25(val, _values, result); end - def _reduce_250(val, _values, result); end - def _reduce_251(val, _values, result); end - def _reduce_252(val, _values, result); end - def _reduce_253(val, _values, result); end - def _reduce_254(val, _values, result); end - def _reduce_255(val, _values, result); end - def _reduce_256(val, _values, result); end - def _reduce_257(val, _values, result); end - def _reduce_26(val, _values, result); end - def _reduce_263(val, _values, result); end - def _reduce_264(val, _values, result); end - def _reduce_268(val, _values, result); end - def _reduce_269(val, _values, result); end - def _reduce_27(val, _values, result); end - def _reduce_271(val, _values, result); end - def _reduce_272(val, _values, result); end - def _reduce_273(val, _values, result); end - def _reduce_274(val, _values, result); end - def _reduce_275(val, _values, result); end - def _reduce_277(val, _values, result); end - def _reduce_28(val, _values, result); end - def _reduce_280(val, _values, result); end - def _reduce_281(val, _values, result); end - def _reduce_282(val, _values, result); end - def _reduce_283(val, _values, result); end - def _reduce_284(val, _values, result); end - def _reduce_285(val, _values, result); end - def _reduce_286(val, _values, result); end - def _reduce_287(val, _values, result); end - def _reduce_288(val, _values, result); end - def _reduce_289(val, _values, result); end - def _reduce_29(val, _values, result); end - def _reduce_290(val, _values, result); end - def _reduce_291(val, _values, result); end - def _reduce_292(val, _values, result); end - def _reduce_293(val, _values, result); end - def _reduce_294(val, _values, result); end - def _reduce_295(val, _values, result); end - def _reduce_296(val, _values, result); end - def _reduce_297(val, _values, result); end - def _reduce_299(val, _values, result); end - def _reduce_3(val, _values, result); end - def _reduce_30(val, _values, result); end - def _reduce_300(val, _values, result); end - def _reduce_301(val, _values, result); end - def _reduce_312(val, _values, result); end - def _reduce_313(val, _values, result); end - def _reduce_314(val, _values, result); end - def _reduce_315(val, _values, result); end - def _reduce_316(val, _values, result); end - def _reduce_317(val, _values, result); end - def _reduce_318(val, _values, result); end - def _reduce_319(val, _values, result); end - def _reduce_32(val, _values, result); end - def _reduce_320(val, _values, result); end - def _reduce_321(val, _values, result); end - def _reduce_322(val, _values, result); end - def _reduce_323(val, _values, result); end - def _reduce_324(val, _values, result); end - def _reduce_325(val, _values, result); end - def _reduce_326(val, _values, result); end - def _reduce_327(val, _values, result); end - def _reduce_328(val, _values, result); end - def _reduce_329(val, _values, result); end - def _reduce_33(val, _values, result); end - def _reduce_330(val, _values, result); end - def _reduce_331(val, _values, result); end - def _reduce_332(val, _values, result); end - def _reduce_334(val, _values, result); end - def _reduce_336(val, _values, result); end - def _reduce_337(val, _values, result); end - def _reduce_338(val, _values, result); end - def _reduce_339(val, _values, result); end - def _reduce_34(val, _values, result); end - def _reduce_340(val, _values, result); end - def _reduce_341(val, _values, result); end - def _reduce_342(val, _values, result); end - def _reduce_343(val, _values, result); end - def _reduce_344(val, _values, result); end - def _reduce_345(val, _values, result); end - def _reduce_346(val, _values, result); end - def _reduce_347(val, _values, result); end - def _reduce_348(val, _values, result); end - def _reduce_349(val, _values, result); end - def _reduce_35(val, _values, result); end - def _reduce_350(val, _values, result); end - def _reduce_351(val, _values, result); end - def _reduce_352(val, _values, result); end - def _reduce_353(val, _values, result); end - def _reduce_354(val, _values, result); end - def _reduce_355(val, _values, result); end - def _reduce_357(val, _values, result); end - def _reduce_358(val, _values, result); end - def _reduce_359(val, _values, result); end - def _reduce_360(val, _values, result); end - def _reduce_363(val, _values, result); end - def _reduce_367(val, _values, result); end - def _reduce_369(val, _values, result); end - def _reduce_37(val, _values, result); end - def _reduce_372(val, _values, result); end - def _reduce_373(val, _values, result); end - def _reduce_374(val, _values, result); end - def _reduce_375(val, _values, result); end - def _reduce_377(val, _values, result); end - def _reduce_378(val, _values, result); end - def _reduce_379(val, _values, result); end - def _reduce_38(val, _values, result); end - def _reduce_380(val, _values, result); end - def _reduce_381(val, _values, result); end - def _reduce_382(val, _values, result); end - def _reduce_385(val, _values, result); end - def _reduce_386(val, _values, result); end - def _reduce_387(val, _values, result); end - def _reduce_388(val, _values, result); end - def _reduce_389(val, _values, result); end - def _reduce_39(val, _values, result); end - def _reduce_390(val, _values, result); end - def _reduce_391(val, _values, result); end - def _reduce_392(val, _values, result); end - def _reduce_394(val, _values, result); end - def _reduce_395(val, _values, result); end - def _reduce_396(val, _values, result); end - def _reduce_397(val, _values, result); end - def _reduce_398(val, _values, result); end - def _reduce_4(val, _values, result); end - def _reduce_40(val, _values, result); end - def _reduce_400(val, _values, result); end - def _reduce_401(val, _values, result); end - def _reduce_402(val, _values, result); end - def _reduce_403(val, _values, result); end - def _reduce_404(val, _values, result); end - def _reduce_405(val, _values, result); end - def _reduce_406(val, _values, result); end - def _reduce_407(val, _values, result); end - def _reduce_409(val, _values, result); end - def _reduce_41(val, _values, result); end - def _reduce_410(val, _values, result); end - def _reduce_411(val, _values, result); end - def _reduce_412(val, _values, result); end - def _reduce_413(val, _values, result); end - def _reduce_414(val, _values, result); end - def _reduce_415(val, _values, result); end - def _reduce_416(val, _values, result); end - def _reduce_417(val, _values, result); end - def _reduce_419(val, _values, result); end - def _reduce_42(val, _values, result); end - def _reduce_420(val, _values, result); end - def _reduce_421(val, _values, result); end - def _reduce_422(val, _values, result); end - def _reduce_423(val, _values, result); end - def _reduce_424(val, _values, result); end - def _reduce_425(val, _values, result); end - def _reduce_426(val, _values, result); end - def _reduce_427(val, _values, result); end - def _reduce_428(val, _values, result); end - def _reduce_429(val, _values, result); end - def _reduce_43(val, _values, result); end - def _reduce_430(val, _values, result); end - def _reduce_431(val, _values, result); end - def _reduce_432(val, _values, result); end - def _reduce_433(val, _values, result); end - def _reduce_434(val, _values, result); end - def _reduce_435(val, _values, result); end - def _reduce_436(val, _values, result); end - def _reduce_437(val, _values, result); end - def _reduce_438(val, _values, result); end - def _reduce_439(val, _values, result); end - def _reduce_44(val, _values, result); end - def _reduce_440(val, _values, result); end - def _reduce_441(val, _values, result); end - def _reduce_442(val, _values, result); end - def _reduce_443(val, _values, result); end - def _reduce_444(val, _values, result); end - def _reduce_445(val, _values, result); end - def _reduce_446(val, _values, result); end - def _reduce_447(val, _values, result); end - def _reduce_448(val, _values, result); end - def _reduce_449(val, _values, result); end - def _reduce_45(val, _values, result); end - def _reduce_450(val, _values, result); end - def _reduce_451(val, _values, result); end - def _reduce_452(val, _values, result); end - def _reduce_453(val, _values, result); end - def _reduce_455(val, _values, result); end - def _reduce_456(val, _values, result); end - def _reduce_457(val, _values, result); end - def _reduce_458(val, _values, result); end - def _reduce_46(val, _values, result); end - def _reduce_460(val, _values, result); end - def _reduce_461(val, _values, result); end - def _reduce_462(val, _values, result); end - def _reduce_464(val, _values, result); end - def _reduce_465(val, _values, result); end - def _reduce_466(val, _values, result); end - def _reduce_467(val, _values, result); end - def _reduce_468(val, _values, result); end - def _reduce_47(val, _values, result); end - def _reduce_470(val, _values, result); end - def _reduce_472(val, _values, result); end - def _reduce_474(val, _values, result); end - def _reduce_475(val, _values, result); end - def _reduce_478(val, _values, result); end - def _reduce_479(val, _values, result); end - def _reduce_48(val, _values, result); end - def _reduce_480(val, _values, result); end - def _reduce_481(val, _values, result); end - def _reduce_482(val, _values, result); end - def _reduce_483(val, _values, result); end - def _reduce_484(val, _values, result); end - def _reduce_485(val, _values, result); end - def _reduce_486(val, _values, result); end - def _reduce_487(val, _values, result); end - def _reduce_488(val, _values, result); end - def _reduce_489(val, _values, result); end - def _reduce_490(val, _values, result); end - def _reduce_491(val, _values, result); end - def _reduce_492(val, _values, result); end - def _reduce_493(val, _values, result); end - def _reduce_494(val, _values, result); end - def _reduce_495(val, _values, result); end - def _reduce_496(val, _values, result); end - def _reduce_497(val, _values, result); end - def _reduce_498(val, _values, result); end - def _reduce_499(val, _values, result); end - def _reduce_5(val, _values, result); end - def _reduce_50(val, _values, result); end - def _reduce_500(val, _values, result); end - def _reduce_502(val, _values, result); end - def _reduce_503(val, _values, result); end - def _reduce_504(val, _values, result); end - def _reduce_505(val, _values, result); end - def _reduce_506(val, _values, result); end - def _reduce_507(val, _values, result); end - def _reduce_508(val, _values, result); end - def _reduce_509(val, _values, result); end - def _reduce_510(val, _values, result); end - def _reduce_512(val, _values, result); end - def _reduce_513(val, _values, result); end - def _reduce_514(val, _values, result); end - def _reduce_515(val, _values, result); end - def _reduce_516(val, _values, result); end - def _reduce_517(val, _values, result); end - def _reduce_518(val, _values, result); end - def _reduce_519(val, _values, result); end - def _reduce_520(val, _values, result); end - def _reduce_521(val, _values, result); end - def _reduce_522(val, _values, result); end - def _reduce_523(val, _values, result); end - def _reduce_524(val, _values, result); end - def _reduce_528(val, _values, result); end - def _reduce_529(val, _values, result); end - def _reduce_53(val, _values, result); end - def _reduce_530(val, _values, result); end - def _reduce_531(val, _values, result); end - def _reduce_535(val, _values, result); end - def _reduce_536(val, _values, result); end - def _reduce_54(val, _values, result); end - def _reduce_545(val, _values, result); end - def _reduce_547(val, _values, result); end - def _reduce_548(val, _values, result); end - def _reduce_549(val, _values, result); end - def _reduce_55(val, _values, result); end - def _reduce_550(val, _values, result); end - def _reduce_551(val, _values, result); end - def _reduce_552(val, _values, result); end - def _reduce_553(val, _values, result); end - def _reduce_554(val, _values, result); end - def _reduce_555(val, _values, result); end - def _reduce_556(val, _values, result); end - def _reduce_559(val, _values, result); end - def _reduce_56(val, _values, result); end - def _reduce_561(val, _values, result); end - def _reduce_565(val, _values, result); end - def _reduce_566(val, _values, result); end - def _reduce_567(val, _values, result); end - def _reduce_568(val, _values, result); end - def _reduce_569(val, _values, result); end - def _reduce_57(val, _values, result); end - def _reduce_570(val, _values, result); end - def _reduce_571(val, _values, result); end - def _reduce_572(val, _values, result); end - def _reduce_573(val, _values, result); end - def _reduce_574(val, _values, result); end - def _reduce_575(val, _values, result); end - def _reduce_576(val, _values, result); end - def _reduce_577(val, _values, result); end - def _reduce_578(val, _values, result); end - def _reduce_579(val, _values, result); end - def _reduce_58(val, _values, result); end - def _reduce_580(val, _values, result); end - def _reduce_581(val, _values, result); end - def _reduce_582(val, _values, result); end - def _reduce_583(val, _values, result); end - def _reduce_584(val, _values, result); end - def _reduce_585(val, _values, result); end - def _reduce_586(val, _values, result); end - def _reduce_587(val, _values, result); end - def _reduce_588(val, _values, result); end - def _reduce_589(val, _values, result); end - def _reduce_59(val, _values, result); end - def _reduce_590(val, _values, result); end - def _reduce_591(val, _values, result); end - def _reduce_592(val, _values, result); end - def _reduce_593(val, _values, result); end - def _reduce_594(val, _values, result); end - def _reduce_595(val, _values, result); end - def _reduce_596(val, _values, result); end - def _reduce_597(val, _values, result); end - def _reduce_598(val, _values, result); end - def _reduce_599(val, _values, result); end - def _reduce_6(val, _values, result); end - def _reduce_60(val, _values, result); end - def _reduce_603(val, _values, result); end - def _reduce_604(val, _values, result); end - def _reduce_605(val, _values, result); end - def _reduce_606(val, _values, result); end - def _reduce_607(val, _values, result); end - def _reduce_608(val, _values, result); end - def _reduce_609(val, _values, result); end - def _reduce_610(val, _values, result); end - def _reduce_611(val, _values, result); end - def _reduce_612(val, _values, result); end - def _reduce_613(val, _values, result); end - def _reduce_614(val, _values, result); end - def _reduce_615(val, _values, result); end - def _reduce_616(val, _values, result); end - def _reduce_617(val, _values, result); end - def _reduce_618(val, _values, result); end - def _reduce_619(val, _values, result); end - def _reduce_620(val, _values, result); end - def _reduce_621(val, _values, result); end - def _reduce_622(val, _values, result); end - def _reduce_623(val, _values, result); end - def _reduce_624(val, _values, result); end - def _reduce_625(val, _values, result); end - def _reduce_626(val, _values, result); end - def _reduce_627(val, _values, result); end - def _reduce_628(val, _values, result); end - def _reduce_629(val, _values, result); end - def _reduce_63(val, _values, result); end - def _reduce_630(val, _values, result); end - def _reduce_631(val, _values, result); end - def _reduce_632(val, _values, result); end - def _reduce_633(val, _values, result); end - def _reduce_634(val, _values, result); end - def _reduce_636(val, _values, result); end - def _reduce_637(val, _values, result); end - def _reduce_639(val, _values, result); end - def _reduce_64(val, _values, result); end - def _reduce_640(val, _values, result); end - def _reduce_641(val, _values, result); end - def _reduce_642(val, _values, result); end - def _reduce_643(val, _values, result); end - def _reduce_644(val, _values, result); end - def _reduce_645(val, _values, result); end - def _reduce_646(val, _values, result); end - def _reduce_647(val, _values, result); end - def _reduce_648(val, _values, result); end - def _reduce_649(val, _values, result); end - def _reduce_65(val, _values, result); end - def _reduce_650(val, _values, result); end - def _reduce_651(val, _values, result); end - def _reduce_652(val, _values, result); end - def _reduce_653(val, _values, result); end - def _reduce_654(val, _values, result); end - def _reduce_655(val, _values, result); end - def _reduce_656(val, _values, result); end - def _reduce_657(val, _values, result); end - def _reduce_658(val, _values, result); end - def _reduce_659(val, _values, result); end - def _reduce_66(val, _values, result); end - def _reduce_660(val, _values, result); end - def _reduce_661(val, _values, result); end - def _reduce_662(val, _values, result); end - def _reduce_663(val, _values, result); end - def _reduce_664(val, _values, result); end - def _reduce_665(val, _values, result); end - def _reduce_666(val, _values, result); end - def _reduce_667(val, _values, result); end - def _reduce_669(val, _values, result); end - def _reduce_67(val, _values, result); end - def _reduce_670(val, _values, result); end - def _reduce_671(val, _values, result); end - def _reduce_672(val, _values, result); end - def _reduce_673(val, _values, result); end - def _reduce_674(val, _values, result); end - def _reduce_675(val, _values, result); end - def _reduce_676(val, _values, result); end - def _reduce_677(val, _values, result); end - def _reduce_678(val, _values, result); end - def _reduce_679(val, _values, result); end - def _reduce_68(val, _values, result); end - def _reduce_680(val, _values, result); end - def _reduce_681(val, _values, result); end - def _reduce_682(val, _values, result); end - def _reduce_683(val, _values, result); end - def _reduce_686(val, _values, result); end - def _reduce_687(val, _values, result); end - def _reduce_688(val, _values, result); end - def _reduce_689(val, _values, result); end - def _reduce_690(val, _values, result); end - def _reduce_691(val, _values, result); end - def _reduce_692(val, _values, result); end - def _reduce_693(val, _values, result); end - def _reduce_694(val, _values, result); end - def _reduce_697(val, _values, result); end - def _reduce_698(val, _values, result); end - def _reduce_7(val, _values, result); end - def _reduce_701(val, _values, result); end - def _reduce_702(val, _values, result); end - def _reduce_703(val, _values, result); end - def _reduce_704(val, _values, result); end - def _reduce_706(val, _values, result); end - def _reduce_707(val, _values, result); end - def _reduce_709(val, _values, result); end - def _reduce_710(val, _values, result); end - def _reduce_711(val, _values, result); end - def _reduce_712(val, _values, result); end - def _reduce_713(val, _values, result); end - def _reduce_714(val, _values, result); end - def _reduce_715(val, _values, result); end - def _reduce_72(val, _values, result); end - def _reduce_728(val, _values, result); end - def _reduce_729(val, _values, result); end - def _reduce_73(val, _values, result); end - def _reduce_734(val, _values, result); end - def _reduce_735(val, _values, result); end - def _reduce_736(val, _values, result); end - def _reduce_74(val, _values, result); end - def _reduce_740(val, _values, result); end - def _reduce_744(val, _values, result); end - def _reduce_76(val, _values, result); end - def _reduce_77(val, _values, result); end - def _reduce_78(val, _values, result); end - def _reduce_79(val, _values, result); end - def _reduce_80(val, _values, result); end - def _reduce_81(val, _values, result); end - def _reduce_82(val, _values, result); end - def _reduce_83(val, _values, result); end - def _reduce_84(val, _values, result); end - def _reduce_85(val, _values, result); end - def _reduce_86(val, _values, result); end - def _reduce_87(val, _values, result); end - def _reduce_88(val, _values, result); end - def _reduce_89(val, _values, result); end - def _reduce_9(val, _values, result); end - def _reduce_90(val, _values, result); end - def _reduce_92(val, _values, result); end - def _reduce_93(val, _values, result); end - def _reduce_94(val, _values, result); end - def _reduce_95(val, _values, result); end - def _reduce_96(val, _values, result); end - def _reduce_97(val, _values, result); end - def _reduce_98(val, _values, result); end - def _reduce_99(val, _values, result); end - def _reduce_none(val, _values, result); end - def default_encoding; end - def endless_method_name(name_t); end - def local_pop; end - def local_push; end - def try_declare_numparam(node); end - def version; end -end - -Parser::Ruby31::Racc_arg = T.let(T.unsafe(nil), Array) -Parser::Ruby31::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) -module Parser::Source; end - -class Parser::Source::Buffer - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - def column_for_position(position); end - def decompose_position(position); end - def first_line; end - def freeze; end - def inspect; end - def last_line; end - def line_for_position(position); end - def line_range(lineno); end - def name; end - def raw_source=(input); end - def read; end - def slice(range); end - def source; end - def source=(input); end - def source_line(lineno); end - def source_lines; end - def source_range; end - - private - - def bsearch(line_begins, position); end - def line_begins; end - def line_index_for_position(position); end - - class << self - def recognize_encoding(string); end - def reencode_string(input); end - end -end - -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -class Parser::Source::Comment - def initialize(range); end - - def ==(other); end - def document?; end - def inline?; end - def inspect; end - def loc; end - def location; end - def text; end - def type; end - - class << self - def associate(ast, comments); end - def associate_by_identity(ast, comments); end - def associate_locations(ast, comments); end - end -end - -class Parser::Source::Comment::Associator - def initialize(ast, comments); end - - def associate; end - def associate_by_identity; end - def associate_locations; end - def skip_directives; end - def skip_directives=(_arg0); end - - private - - def advance_comment; end - def advance_through_directives; end - def associate_and_advance_comment(node); end - def children_in_source_order(node); end - def current_comment_before?(node); end - def current_comment_before_end?(node); end - def current_comment_decorates?(node); end - def do_associate; end - def process_leading_comments(node); end - def process_trailing_comments(node); end - def visit(node); end -end - -Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) -Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) - -class Parser::Source::Map - def initialize(expression); end - - def ==(other); end - def column; end - def expression; end - def first_line; end - def last_column; end - def last_line; end - def line; end - def node; end - def node=(node); end - def to_hash; end - def with_expression(expression_l); end - - protected - - def update_expression(expression_l); end - def with(&block); end - - private - - def initialize_copy(other); end -end - -class Parser::Source::Map::Collection < ::Parser::Source::Map - def initialize(begin_l, end_l, expression_l); end - - def begin; end - def end; end -end - -class Parser::Source::Map::Condition < ::Parser::Source::Map - def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end - - def begin; end - def else; end - def end; end - def keyword; end -end - -class Parser::Source::Map::Constant < ::Parser::Source::Map - def initialize(double_colon, name, expression); end - - def double_colon; end - def name; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Definition < ::Parser::Source::Map - def initialize(keyword_l, operator_l, name_l, end_l); end - - def end; end - def keyword; end - def name; end - def operator; end -end - -class Parser::Source::Map::For < ::Parser::Source::Map - def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end - - def begin; end - def end; end - def in; end - def keyword; end -end - -class Parser::Source::Map::Heredoc < ::Parser::Source::Map - def initialize(begin_l, body_l, end_l); end - - def heredoc_body; end - def heredoc_end; end -end - -class Parser::Source::Map::Index < ::Parser::Source::Map - def initialize(begin_l, end_l, expression_l); end - - def begin; end - def end; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Keyword < ::Parser::Source::Map - def initialize(keyword_l, begin_l, end_l, expression_l); end - - def begin; end - def end; end - def keyword; end -end - -class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map - def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end - - def assignment; end - def end; end - def keyword; end - def name; end - def operator; end -end - -class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map - def initialize(keyword_l, operator_l, argument_l, expression_l); end - - def argument; end - def keyword; end - def operator; end -end - -class Parser::Source::Map::Operator < ::Parser::Source::Map - def initialize(operator, expression); end - - def operator; end -end - -class Parser::Source::Map::RescueBody < ::Parser::Source::Map - def initialize(keyword_l, assoc_l, begin_l, expression_l); end - - def assoc; end - def begin; end - def keyword; end -end - -class Parser::Source::Map::Send < ::Parser::Source::Map - def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end - - def begin; end - def dot; end - def end; end - def operator; end - def selector; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Ternary < ::Parser::Source::Map - def initialize(question_l, colon_l, expression_l); end - - def colon; end - def question; end -end - -class Parser::Source::Map::Variable < ::Parser::Source::Map - def initialize(name_l, expression_l = T.unsafe(nil)); end - - def name; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Range - include ::Comparable - include ::RuboCop::AST::Ext::Range - - def initialize(source_buffer, begin_pos, end_pos); end - - def <=>(other); end - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - def begin; end - def begin_pos; end - def column; end - def column_range; end - def contained?(other); end - def contains?(other); end - def crossing?(other); end - def disjoint?(other); end - def empty?; end - def end; end - def end_pos; end - def eql?(_arg0); end - def first_line; end - def hash; end - def inspect; end - def intersect(other); end - def is?(*what); end - def join(other); end - def last_column; end - def last_line; end - def length; end - def line; end - def overlaps?(other); end - def resize(new_size); end - def size; end - def source; end - def source_buffer; end - def source_line; end - def to_a; end - def to_range; end - def to_s; end - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -class Parser::Source::Rewriter - extend ::Parser::Deprecation - - def initialize(source_buffer); end - - def diagnostics; end - def insert_after(range, content); end - def insert_after_multi(range, content); end - def insert_before(range, content); end - def insert_before_multi(range, content); end - def process; end - def remove(range); end - def replace(range, content); end - def source_buffer; end - def transaction; end - def wrap(range, before, after); end - - private - - def active_clobber; end - def active_clobber=(value); end - def active_insertions; end - def active_insertions=(value); end - def active_queue; end - def adjacent?(range1, range2); end - def adjacent_insertion_mask(range); end - def adjacent_insertions?(range); end - def adjacent_position_mask(range); end - def adjacent_updates?(range); end - def append(action); end - def can_merge?(action, existing); end - def clobbered_insertion?(insertion); end - def clobbered_position_mask(range); end - def in_transaction?; end - def merge_actions(action, existing); end - def merge_actions!(action, existing); end - def merge_replacements(actions); end - def raise_clobber_error(action, existing); end - def record_insertion(range); end - def record_replace(range); end - def replace_actions(old, updated); end - def replace_compatible_with_insertion?(replace, insertion); end -end - -class Parser::Source::Rewriter::Action - include ::Comparable - - def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end - - def <=>(other); end - def allow_multiple_insertions; end - def allow_multiple_insertions?; end - def order; end - def range; end - def replacement; end - def to_s; end -end - -Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -class Parser::Source::TreeRewriter - extend ::Parser::Deprecation - - def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end - - def as_nested_actions; end - def as_replacements; end - def diagnostics; end - def empty?; end - def import!(foreign_rewriter, offset: T.unsafe(nil)); end - def in_transaction?; end - def insert_after(range, content); end - def insert_after_multi(range, text); end - def insert_before(range, content); end - def insert_before_multi(range, text); end - def inspect; end - def merge(with); end - def merge!(with); end - def process; end - def remove(range); end - def replace(range, content); end - def source_buffer; end - def transaction; end - def wrap(range, insert_before, insert_after); end - - protected - - def action_root; end - - private - - def action_summary; end - def check_policy_validity; end - def check_range_validity(range); end - def combine(range, attributes); end - def enforce_policy(event); end - def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end -end - -Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) - -class Parser::Source::TreeRewriter::Action - def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - - def combine(action); end - def contract; end - def empty?; end - def insert_after; end - def insert_before; end - def insertion?; end - def moved(source_buffer, offset); end - def nested_actions; end - def ordered_replacements; end - def range; end - def replacement; end - - protected - - def analyse_hierarchy(action); end - def bsearch_child_index(from = T.unsafe(nil)); end - def call_enforcer_for_merge(action); end - def check_fusible(action, *fusible); end - def children; end - def combine_children(more_children); end - def do_combine(action); end - def fuse_deletions(action, fusible, other_sibblings); end - def merge(action); end - def place_in_hierarchy(action); end - def swallow(children); end - def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end -end - -Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) - -class Parser::StaticEnvironment - def initialize; end - - def declare(name); end - def declare_anonymous_blockarg; end - def declare_forward_args; end - def declared?(name); end - def declared_anonymous_blockarg?; end - def declared_forward_args?; end - def empty?; end - def extend_dynamic; end - def extend_static; end - def reset; end - def unextend; end -end - -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) -Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) - -class Parser::SyntaxError < ::StandardError - def initialize(diagnostic); end - - def diagnostic; end -end - -class Parser::TreeRewriter < ::Parser::AST::Processor - def assignment?(node); end - def insert_after(range, content); end - def insert_before(range, content); end - def remove(range); end - def replace(range, content); end - def rewrite(source_buffer, ast, **policy); end - def wrap(range, before, after); end -end - -Parser::VERSION = T.let(T.unsafe(nil), String) - -class Parser::VariablesStack - def initialize; end - - def declare(name); end - def declared?(name); end - def empty?; end - def pop; end - def push; end - def reset; end -end diff --git a/sorbet/rbi/gems/parser@3.3.11.1.rbi b/sorbet/rbi/gems/parser@3.3.11.1.rbi new file mode 100644 index 00000000..1d300645 --- /dev/null +++ b/sorbet/rbi/gems/parser@3.3.11.1.rbi @@ -0,0 +1,5229 @@ +# 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 +# +# pkg:gem/parser#lib/parser.rb:19 +module Parser; end + +# pkg:gem/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 +# +# @!attribute [r] location +# Source map for this Node. +# @return [Parser::Source::Map] +# +# pkg:gem/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. + # + # @param [Hash] properties + # @option properties [Parser::Source::Map] :location Location information + # of the node. + # + # pkg:gem/parser#lib/parser/ast/node.rb:30 + def assign_properties(properties); end + + # pkg:gem/parser#lib/parser/ast/node.rb:20 + def loc; end + + # pkg:gem/parser#lib/parser/ast/node.rb:18 + def location; end +end + +# @api public +# +# pkg:gem/parser#lib/parser/ast/processor.rb:9 +class Parser::AST::Processor + include ::AST::Processor::Mixin + + # pkg:gem/parser#lib/parser/ast/processor.rb:179 + def on_alias(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:222 + def on_and(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:67 + def on_and_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:122 + def on_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:148 + def on_arg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:103 + def on_args(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:105 + def on_argument(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:22 + def on_array(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:258 + def on_array_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:259 + def on_array_pattern_with_tail(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:42 + def on_back_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:240 + def on_begin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:195 + def on_block(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:151 + def on_block_pass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:125 + def on_blockarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:150 + def on_blockarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:213 + def on_break(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:228 + def on_case(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:246 + def on_case_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:89 + def on_casgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:157 + def on_class(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:81 + def on_const(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:261 + def on_const_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:190 + def on_csend(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:41 + def on_cvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:65 + def on_cvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:160 + def on_def(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:219 + def on_defined?(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:169 + def on_defs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:16 + def on_dstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:17 + def on_dsym(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:231 + def on_eflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:288 + def on_empty_else(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:238 + def on_ensure(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:27 + def on_erange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:262 + def on_find_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:210 + def on_for(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:130 + def on_forward_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:154 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:153 + def on_forwarded_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:40 + def on_gvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:64 + def on_gvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:24 + def on_hash(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:260 + def on_hash_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:225 + def on_if(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:251 + def on_if_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:230 + def on_iflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:247 + def on_in_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:250 + def on_in_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:192 + def on_index(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:193 + def on_indexasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:26 + def on_irange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:39 + def on_ivar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:63 + def on_ivasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:127 + def on_kwarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:25 + def on_kwargs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:241 + def on_kwbegin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:128 + def on_kwoptarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:129 + def on_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:21 + def on_kwsplat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:196 + def on_lambda(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:38 + def on_lvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:62 + def on_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:79 + def on_masgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:256 + def on_match_alt(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:257 + def on_match_as(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:233 + def on_match_current_line(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:248 + def on_match_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:249 + def on_match_pattern_p(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:254 + def on_match_rest(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:253 + def on_match_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:234 + def on_match_with_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:78 + def on_mlhs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:156 + def on_module(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:214 + def on_next(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:221 + def on_not(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:43 + def on_nth_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:198 + def on_numblock(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:70 + def on_op_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:123 + def on_optarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:223 + def on_or(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:68 + def on_or_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:23 + def on_pair(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:255 + def on_pin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:244 + def on_postexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:243 + def on_preexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:132 + def on_procarg0(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:215 + def on_redo(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:18 + def on_regexp(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:236 + def on_resbody(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:237 + def on_rescue(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:124 + def on_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:149 + def on_restarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:216 + def on_retry(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:212 + def on_return(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:158 + def on_sclass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:181 + def on_send(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:126 + def on_shadowarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:20 + def on_splat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:217 + def on_super(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:178 + def on_undef(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:252 + def on_unless_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:208 + def on_until(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:209 + def on_until_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:29 + def on_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:45 + def on_vasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:227 + def on_when(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:206 + def on_while(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:207 + def on_while_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:19 + def on_xstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:218 + def on_yield(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:118 + def process_argument_node(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:12 + def process_regular_node(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:58 + def process_var_asgn_node(node); end + + # @private + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:34 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# @!attribute [r] diagnostics +# @return [Parser::Diagnostic::Engine] +# +# @!attribute [r] static_env +# @return [Parser::StaticEnvironment] +# +# @!attribute [r] version +# @return [Integer] +# +# pkg:gem/parser#lib/parser/base.rb:19 +class Parser::Base < ::Racc::Parser + # @param [Parser::Builders::Default] builder The AST builder to use. + # + # pkg:gem/parser#lib/parser/base.rb:129 + def initialize(builder = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:117 + def builder; end + + # pkg:gem/parser#lib/parser/base.rb:120 + def context; end + + # pkg:gem/parser#lib/parser/base.rb:122 + def current_arg_stack; end + + # pkg:gem/parser#lib/parser/base.rb:116 + def diagnostics; end + + # pkg:gem/parser#lib/parser/base.rb:115 + def lexer; end + + # pkg:gem/parser#lib/parser/base.rb:121 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @param [Parser::Source::Buffer] source_buffer The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # pkg:gem/parser#lib/parser/base.rb:189 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @see #parse + # @see Parser::Source::Comment#associate + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:207 + def parse_with_comments(source_buffer); end + + # pkg:gem/parser#lib/parser/base.rb:124 + def pattern_hash_keys; end + + # pkg:gem/parser#lib/parser/base.rb:123 + def pattern_variables; end + + # Resets the state of the parser. + # + # pkg:gem/parser#lib/parser/base.rb:170 + def reset; end + + # pkg:gem/parser#lib/parser/base.rb:119 + def source_buffer; end + + # pkg:gem/parser#lib/parser/base.rb:118 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Boolean] recover If true, recover from syntax errors. False by default. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:236 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:260 + def check_kwarg_name(name_t); end + + # pkg:gem/parser#lib/parser/base.rb:269 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:254 + def next_token; end + + # pkg:gem/parser#lib/parser/base.rb:285 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @return [Parser::Base] parser with the default options set. + # + # pkg:gem/parser#lib/parser/base.rb:87 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Parser::AST::Node] + # + # pkg:gem/parser#lib/parser/base.rb:33 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:67 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Array] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:80 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:52 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:100 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# pkg:gem/parser#lib/parser.rb:78 +module Parser::Builders; end + +# Default AST builder. Uses {AST::Node}s. +# +# pkg:gem/parser#lib/parser/builders/default.rb:8 +class Parser::Builders::Default + # Initializes attributes: + # + # * `emit_file_line_as_literals`: `true` + # + # pkg:gem/parser#lib/parser/builders/default.rb:243 + def initialize; end + + # pkg:gem/parser#lib/parser/builders/default.rb:703 + def __ENCODING__(__ENCODING__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:348 + def __FILE__(__FILE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:312 + def __LINE__(__LINE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:622 + def accessible(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:878 + def alias(alias_t, to, from); end + + # pkg:gem/parser#lib/parser/builders/default.rb:917 + def arg(name_t); end + + # Ruby 1.8 block arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1007 + def arg_expr(expr); end + + # Formal arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:887 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # Arrays + # + # pkg:gem/parser#lib/parser/builders/default.rb:440 + def array(begin_t, elements, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1598 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:767 + def assign(lhs, eql_t, rhs); end + + # Assignment + # + # pkg:gem/parser#lib/parser/builders/default.rb:712 + def assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:540 + def associate(begin_t, pairs, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1175 + def attr_asgn(receiver, dot_t, selector_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:612 + def back_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1443 + def begin(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1385 + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1461 + def begin_keyword(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1213 + def binary_op(receiver, operator_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1122 + def block(method_call, begin_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1161 + def block_pass(amper_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:982 + def blockarg(amper_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1027 + def blockarg_expr(amper_t, expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1113 + def call_lambda(lambda_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1096 + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # Method calls + # + # pkg:gem/parser#lib/parser/builders/default.rb:1068 + def call_type_for_dot(dot_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1318 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # PATTERN MATCHING + # + # pkg:gem/parser#lib/parser/builders/default.rb:1481 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:343 + def character(char_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:284 + def complex(complex_t); end + + # Expression grouping + # + # pkg:gem/parser#lib/parser/builders/default.rb:1431 + def compstmt(statements); end + + # Conditionals + # + # pkg:gem/parser#lib/parser/builders/default.rb:1294 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1300 + def condition_mod(if_true, if_false, cond_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:686 + def const(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:698 + def const_fetch(scope, t_colon2, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:691 + def const_global(t_colon3, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:763 + def const_op_assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1628 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:607 + def cvar(token); end + + # Indented (interpolated, noninterpolated, executable) strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:388 + def dedent_string(node, dedent_level); end + + # Class and module definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:814 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:845 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:863 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # Method (un)definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:837 + def def_method(def_t, name_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:827 + def def_module(module_t, name, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:821 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:853 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals; end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:265 + def false(false_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1619 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:276 + def float(float_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1339 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:913 + def forward_arg(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:903 + def forward_only_args(begin_t, dots_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1084 + def forwarded_args(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1092 + def forwarded_kwrestarg(dstar_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1088 + def forwarded_restarg(star_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:596 + def gvar(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1592 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:586 + def ident(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1508 + def if_guard(if_t, if_body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1487 + def in_match(lhs, in_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1502 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1184 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1198 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # Numerics + # + # pkg:gem/parser#lib/parser/builders/default.rb:272 + def integer(integer_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:591 + def ivar(token); end + + # Keywords + # + # pkg:gem/parser#lib/parser/builders/default.rb:1347 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:944 + def kwarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:970 + def kwnilarg(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:951 + def kwoptarg(name_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:958 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:535 + def kwsplat(dstar_t, arg); end + + # Logical operations: and, or + # + # pkg:gem/parser#lib/parser/builders/default.rb:1287 + def logical_op(type, lhs, op_t, rhs); end + + # Loops + # + # pkg:gem/parser#lib/parser/builders/default.rb:1325 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1330 + def loop_mod(type, body, keyword_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1642 + def match_alt(left, pipe_t, right); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1649 + def match_as(value, assoc_t, as); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1528 + def match_hash_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1542 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1680 + def match_label(label_type, label); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1656 + def match_nil_pattern(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1235 + def match_op(receiver, match_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1661 + def match_pair(label_type, label, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1492 + def match_pattern(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1497 + def match_pattern_p(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1581 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1516 + def match_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1624 + def match_with_trailing_comma(match, comma_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:805 + def multi_assign(lhs, eql_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:800 + def multi_lhs(begin_t, items, end_t); end + + # Singletons + # + # pkg:gem/parser#lib/parser/builders/default.rb:255 + def nil(nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1263 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:617 + def nth_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:899 + def numargs(max_numparam); end + + # MacRuby Objective-C arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1038 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1052 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1166 + def objc_varargs(pair, rest_of_varargs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:774 + def op_assign(lhs, op_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:924 + def optarg(name_t, eql_t, value); end + + # Hashes + # + # pkg:gem/parser#lib/parser/builders/default.rb:488 + def pair(key, assoc_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:505 + def pair_keyword(key_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:521 + def pair_label(key_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:493 + def pair_list_18(list); end + + # pkg:gem/parser#lib/parser/builders/default.rb:513 + def pair_quoted(begin_t, parts, end_t, value); end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser; end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1637 + def pin(pin_t, var); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1370 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # BEGIN, END + # + # pkg:gem/parser#lib/parser/builders/default.rb:1365 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:992 + def procarg0(arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:572 + def range_exclusive(lhs, dot3_t, rhs); end + + # Ranges + # + # pkg:gem/parser#lib/parser/builders/default.rb:567 + def range_inclusive(lhs, dot2_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:280 + def rational(rational_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:426 + def regexp_compose(begin_t, parts, end_t, options); end + + # Regular expressions + # + # pkg:gem/parser#lib/parser/builders/default.rb:417 + def regexp_options(regopt_t); end + + # Exception handling + # + # pkg:gem/parser#lib/parser/builders/default.rb:1377 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # pkg:gem/parser#lib/parser/builders/default.rb:933 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1016 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # Access + # + # pkg:gem/parser#lib/parser/builders/default.rb:581 + def self(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:975 + def shadowarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:445 + def splat(star_t, arg = T.unsafe(nil)); end + + # Strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:319 + def string(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:329 + def string_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:324 + def string_internal(string_t); end + + # Symbols + # + # pkg:gem/parser#lib/parser/builders/default.rb:355 + def symbol(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:365 + def symbol_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:360 + def symbol_internal(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:469 + def symbols_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1305 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # pkg:gem/parser#lib/parser/builders/default.rb:260 + def true(true_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:294 + def unary_num(unary_t, numeric); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1251 + def unary_op(op_t, receiver); end + + # pkg:gem/parser#lib/parser/builders/default.rb:873 + def undef_method(undef_t, names); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1512 + def unless_guard(unless_t, unless_body); end + + # Case matching + # + # pkg:gem/parser#lib/parser/builders/default.rb:1312 + def when(when_t, patterns, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:455 + def word(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:464 + def words_compose(begin_t, parts, end_t); end + + # Executable strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # pkg:gem/parser#lib/parser/builders/default.rb:1829 + def arg_name_collides?(this_name, that_name); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2025 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1999 + def binary_op_map(left_e, op_t, right_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2127 + def block_map(receiver_l, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1804 + def check_assignment_to_numparam(name, loc); end + + # VERIFICATION + # + # pkg:gem/parser#lib/parser/builders/default.rb:1696 + def check_condition(cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1775 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1750 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1862 + def check_duplicate_pattern_key(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1852 + def check_duplicate_pattern_variable(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1844 + def check_lvar_name(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1819 + def check_reserved_for_numparam(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2293 + def collapse_string_parts?(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1950 + def collection_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2154 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1985 + def constant_map(scope, colon2_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2058 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1891 + def delimited_string_map(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2315 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2198 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2064 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1946 + def expr_map(loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2179 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2226 + def guard_map(keyword_t, guard_body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2116 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1882 + def join_exprs(left_expr, right_expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2132 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2149 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2035 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2346 + def kwargs?(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2310 + def loc(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2048 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # SOURCE MAPS + # + # pkg:gem/parser#lib/parser/builders/default.rb:1874 + def n(type, children, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1878 + def n0(type, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:288 + def numeric(kind, token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1916 + def pair_keyword_map(key_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1931 + def pair_quoted_map(begin_t, end_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1902 + def prefix_string_map(symbol); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2013 + def range_map(start_e, op_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1980 + def regexp_map(begin_t, end_t, options_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2185 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2336 + def rewrite_hash_args_to_kwargs(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2098 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2121 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2072 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2104 + def send_unary_op_map(selector_t, arg_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2257 + def static_regexp(parts, options); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2282 + def static_regexp_node(node); end + + # Extract a static string from e.g. a regular expression, + # honoring the fact that MRI expands interpolations like #{""} + # at parse time. + # + # pkg:gem/parser#lib/parser/builders/default.rb:2240 + def static_string(nodes); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1966 + def string_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2302 + def string_value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2174 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1887 + def token_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2003 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1911 + def unquoted_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2324 + def validate_definee(definee); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1789 + def validate_no_forward_arg_after_restarg(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2298 + def value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2092 + def var_send_map(variable_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1995 + def variable_map(name_t); end + + class << self + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0; end + + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0=(_arg0); end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding; end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding=(_arg0); end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg; end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg=(_arg0); end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index; end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index=(_arg0); end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs; end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs=(_arg0); end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda; end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda=(_arg0); end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern; end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern=(_arg0); end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0; end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0=(_arg0); end + + # @api private + # + # pkg:gem/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 +# +# pkg:gem/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 (-> {}) +# +# pkg:gem/parser#lib/parser/context.rb:18 +class Parser::Context + # pkg:gem/parser#lib/parser/context.rb:30 + def initialize; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:47 + def in_dynamic_block?; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:34 + def reset; end +end + +# pkg:gem/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 +# +# pkg:gem/parser#lib/parser/current_arg_stack.rb:14 +class Parser::CurrentArgStack + # pkg:gem/parser#lib/parser/current_arg_stack.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:22 + def empty?; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:34 + def pop; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:26 + def push(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:38 + def reset; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:30 + def set(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:15 + def stack; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:42 + def top; end +end + +# @api private +# +# pkg:gem/parser#lib/parser/deprecation.rb:7 +module Parser::Deprecation + # pkg:gem/parser#lib/parser/deprecation.rb:9 + def warn_of_deprecation; end + + # pkg:gem/parser#lib/parser/deprecation.rb:8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# @!attribute [r] level +# @see LEVELS +# @return [Symbol] diagnostic level +# +# @!attribute [r] reason +# @see Parser::MESSAGES +# @return [Symbol] reason for error +# +# @!attribute [r] arguments +# @see Parser::MESSAGES +# @return [Symbol] extended arguments that describe the error +# +# @!attribute [r] message +# @return [String] error message +# +# @!attribute [r] location +# Main error-related source range. +# @return [Parser::Source::Range] +# +# @!attribute [r] highlights +# Supplementary error-related source ranges. +# @return [Array] +# +# pkg:gem/parser#lib/parser/diagnostic.rb:31 +class Parser::Diagnostic + # @param [Symbol] level + # @param [Symbol] reason + # @param [Hash] arguments + # @param [Parser::Source::Range] location + # @param [Array] highlights + # + # pkg:gem/parser#lib/parser/diagnostic.rb:49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def arguments; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def highlights; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def level; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def location; end + + # @return [String] the rendered message. + # + # pkg:gem/parser#lib/parser/diagnostic.rb:69 + def message; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @return [Parser::Source::Range] + # + # pkg:gem/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. + # + # @return [Parser::Source::Range] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# {Parser::Diagnostic::Engine} provides a basic API for dealing with +# diagnostics by delegating them to registered consumers. +# +# @example +# buffer = Parser::Source::Buffer.new(__FILE__, source: 'foobar') +# +# consumer = lambda do |diagnostic| +# puts diagnostic.message +# end +# +# engine = Parser::Diagnostic::Engine.new(consumer) +# diagnostic = Parser::Diagnostic.new( +# :warning, :unexpected_token, { :token => 'abc' }, buffer, 1..2) +# +# engine.process(diagnostic) # => "unexpected token abc" +# +# @api public +# +# @!attribute [rw] consumer +# @return [#call(Diagnostic)] +# +# @!attribute [rw] all_errors_are_fatal +# When set to `true` any error that is encountered will result in +# {Parser::SyntaxError} being raised. +# @return [Boolean] +# +# @!attribute [rw] ignore_warnings +# When set to `true` warnings will be ignored. +# @return [Boolean] +# +# pkg:gem/parser#lib/parser/diagnostic/engine.rb:36 +class Parser::Diagnostic::Engine + # @param [#call(Diagnostic)] consumer + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:45 + def initialize(consumer = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings=(_arg0); end + + # Processes a `diagnostic`: + # * Passes the diagnostic to the consumer, if it's not a warning when + # `ignore_warnings` is set. + # * After that, raises {Parser::SyntaxError} when `all_errors_are_fatal` + # is set to true. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Parser::Diagnostic::Engine] + # @see ignore? + # @see raise? + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:64 + def process(diagnostic); end + + protected + + # Checks whether `diagnostic` should be ignored. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:86 + def ignore?(diagnostic); end + + # Checks whether `diagnostic` should be raised as an exception. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @return [Array] +# +# pkg:gem/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 +# +# 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 +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:82 +class Parser::Lexer + # pkg:gem/parser#lib/parser/lexer-F1.rb:8250 + def initialize(version); end + + # Return next token: [type, value]. + # Return next token: [type, value]. + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8419 + def advance; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cmdarg_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cond_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8281 + def construct_float(chars); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8414 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8367 + def encoding; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def lambda_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def paren_nest; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8401 + def pop_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8410 + def pop_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8396 + def push_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8405 + def push_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8290 + def reset(reset_state = T.unsafe(nil)); end + + # line 82 "lib/parser/lexer.rl" + # % + # line 82 "lib/parser/lexer.rl" + # % + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8238 + def source_buffer; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8343 + def source_buffer=(source_buffer); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8388 + def state; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8392 + def state=(state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def version; end + + protected + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14701 + def arg_or_cmdarg(cmd_state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14763 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14725 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14731 + def e_lbrace; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14675 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14784 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14812 + def emit_colon_with_digits(p, tm, diag_msg); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14709 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14721 + def emit_comment_from_range(p, pe); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14691 + def emit_do(do_block = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14774 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14792 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14800 + def emit_rbrace_rparen_rbrack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14822 + def emit_singleton_class; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14685 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14740 + def numeric_literal_int; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14759 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14671 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14662 + def stack_pop; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14667 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14658 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs=(_arg0); end + end +end + +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:5 +class Parser::Lexer::Dedenter + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:9 + def initialize(dedent_level); end + + # For a heredoc like + # <<-HERE + # a + # b + # HERE + # this method gets called with " a\n" and " b\n" + # + # However, the following heredoc: + # + # <<-HERE + # a\ + # b + # HERE + # calls this method only once with a string " a\\\n b\n" + # + # This is important because technically it's a single line, + # but it has to be concatenated __after__ dedenting. + # + # It has no effect for non-squiggly heredocs, i.e. it simply removes "\\\n" + # Of course, lexer could do it but once again: it's all because of dedenting. + # + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:36 + def dedent(string); end + + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:83 + def interrupt; end +end + +# Tab (\t) counts as 8 spaces +# +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14869 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14855 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14862 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:8371 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:6 +class Parser::Lexer::Literal + # pkg:gem/parser#lib/parser/lexer/literal.rb:42 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:116 + def backslash_delimited?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:191 + def end_interp_brace_and_try_closing; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:218 + def extend_content; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:222 + def extend_space(ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:197 + def extend_string(string, ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:204 + def flush_string; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:104 + def heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def heredoc_e; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:168 + def infer_indent_level(line); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:91 + def interpolate?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:124 + def munge_escape?(character); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:108 + def plain_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:100 + def regexp?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:112 + def squiggly_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:187 + def start_interp_brace; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def str_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:232 + def supports_line_continuation_via_slash?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:120 + def type; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:95 + def words?; end + + protected + + # pkg:gem/parser#lib/parser/lexer/literal.rb:263 + def clear_buffer; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:259 + def coerce_encoding(string); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:238 + def delimiter?(delimiter); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:279 + def emit(token, type, s, e); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:274 + def emit_start_tok; end +end + +# pkg:gem/parser#lib/parser/lexer/literal.rb:7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# Mapping of strings to parser tokens. +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:14829 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14849 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/stack_state.rb:5 +class Parser::Lexer::StackState + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:6 + def initialize(name); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:34 + def active?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:11 + def clear; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:38 + def empty?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:46 + def inspect; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:29 + def lexpop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:22 + def pop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:15 + def push(bit); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:6 +class Parser::LexerStrings + # pkg:gem/parser#lib/parser/lexer-strings.rb:3300 + def initialize(lexer, version); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3339 + def advance(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5069 + def close_interp_on_current_literal(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5043 + def continue_lexing(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5092 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5047 + def literal; end + + # pkg:gem/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 + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5100 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5051 + def pop_literal; end + + # === LITERAL STACK === + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5009 + def push_literal(*args); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:4999 + def read_character_constant(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3314 + def reset; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts=(_arg0); end + + protected + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5406 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5417 + def check_invalid_escapes(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5136 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5396 + def emit_character_constant; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5373 + def emit_interp_var(interp_var_kind); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5140 + def emit_invalid_escapes?; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5291 + def encode_escape(ord); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5384 + def encode_escaped_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5112 + def eof_codepoint?(point); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5210 + def extend_interp_code(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5225 + def extend_interp_digit_var; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5364 + def extend_interp_var(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5251 + def extend_string_eol_heredoc_intertwined(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5241 + def extend_string_eol_heredoc_line; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5154 + def extend_string_escaped; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5287 + def extend_string_for_token_range(current_literal, string); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5279 + def extend_string_slice_end(lookahead); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5356 + def read_post_meta_or_ctrl_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5388 + def slash_c_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5392 + def slash_m_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5295 + def unescape_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5307 + def unicode_points(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5116 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs=(_arg0); end + end +end + +# line 6 "lib/parser/lexer-strings.rl" +# % +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:5423 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/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. +# +# @see Diagnostic +# +# @api public +# +# pkg:gem/parser#lib/parser/messages.rb:11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:8 +class Parser::MaxNumparamStack + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:13 + def initialize; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:17 + def empty?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:29 + def has_numparams?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:21 + def has_ordinary_params!; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:25 + def has_ordinary_params?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:45 + def pop; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:41 + def push(static:); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:33 + def register(numparam); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:9 + def stack; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:37 + def top; end + + private + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:51 + def set(value); end +end + +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# pkg:gem/parser#lib/parser/messages.rb:112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # pkg:gem/parser#lib/parser/messages.rb:119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# pkg:gem/parser#lib/parser/meta.rb:5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# Includes node types that are only emitted by the prism parser translator. +# +# pkg:gem/parser#lib/parser/meta.rb:17 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# These are node types required by `Prism::Translation::Parser`, +# which has advanced syntax support ahead of the Parser gem. +# +# pkg:gem/parser#lib/parser/meta.rb:9 +Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# pkg:gem/parser#lib/parser/rewriter.rb:14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # pkg:gem/parser#lib/parser/rewriter.rb:98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/rewriter.rb:38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:67 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/rewriter.rb:47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @return [String] + # + # pkg:gem/parser#lib/parser/rewriter.rb:23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:57 + def wrap(range, before, after); end +end + +# pkg:gem/parser#lib/parser/rewriter.rb:91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/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. +# +# @!attribute [r] name +# Buffer name. If the buffer was created from a file, the name corresponds +# to relative path to the file. +# @return [String] buffer name +# +# @!attribute [r] first_line +# First line of the buffer, 1 by default. +# @return [Integer] first line +# +# @api public +# +# pkg:gem/parser#lib/parser/source/buffer.rb:25 +class Parser::Source::Buffer + # pkg:gem/parser#lib/parser/source/buffer.rb:110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @param [Integer] position + # @return [Integer] column + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @param [Integer] position + # @return [[Integer, Integer]] `[line, column]` + # + # pkg:gem/parser#lib/parser/source/buffer.rb:222 + def decompose_position(position); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def first_line; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:317 + def freeze; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:323 + def inspect; end + + # Number of last line in the buffer + # + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @param [Integer] position + # @return [Integer] line + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [Range] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:289 + def line_range(lineno); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # + # @return [Buffer] self + # @raise [ArgumentError] if already populated + # + # pkg:gem/parser#lib/parser/source/buffer.rb:136 + def read; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @return [String] source code + # @raise [RuntimeError] if buffer is not populated yet + # + # pkg:gem/parser#lib/parser/source/buffer.rb:150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [String] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:257 + def source_lines; end + + # @return [Range] A range covering the whole source + # + # pkg:gem/parser#lib/parser/source/buffer.rb:303 + def source_range; end + + private + + # RUBY_VERSION >= 2.3 + # + # pkg:gem/parser#lib/parser/source/buffer.rb:353 + def bsearch(line_begins, position); end + + # @returns [0, line_begin_of_line_1, ..., source.size + 1] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:330 + def line_begins; end + + # @returns 0-based line index of position + # + # pkg:gem/parser#lib/parser/source/buffer.rb:344 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @param [String] string + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # pkg:gem/parser#lib/parser/source/buffer.rb:52 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @param [String] input + # @return [String] + # @raise [EncodingError] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:95 + def reencode_string(input); end + end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/buffer.rb:31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @!attribute [r] text +# @return [String] +# +# @!attribute [r] location +# @return [Parser::Source::Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment.rb:17 +class Parser::Source::Comment + # @param [Parser::Source::Range] range + # + # pkg:gem/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. + # + # @param [Object] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/comment.rb:120 + def ==(other); end + + # @see #type + # @return [Boolean] true if this is a block comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:109 + def document?; end + + # @see #type + # @return [Boolean] true if this is an inline comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:101 + def inline?; end + + # @return [String] a human-readable representation of this comment + # + # pkg:gem/parser#lib/parser/source/comment.rb:128 + def inspect; end + + # pkg:gem/parser#lib/parser/source/comment.rb:21 + def loc; end + + # pkg:gem/parser#lib/parser/source/comment.rb:20 + def location; end + + # pkg:gem/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 + # + # @return [Symbol] + # + # pkg:gem/parser#lib/parser/source/comment.rb:89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment.rb:32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # pkg:gem/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. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # pkg:gem/parser#lib/parser/source/comment.rb:46 + def associate_locations(ast, comments); end + end +end + +# A processor which associates AST nodes with comments based on their +# location in source code. It may be used, for example, to implement +# rdoc-style processing. +# +# @example +# require 'parser/current' +# +# ast, comments = Parser::CurrentRuby.parse_with_comments(<<-CODE) +# # Class stuff +# class Foo +# # Attr stuff +# # @see bar +# attr_accessor :foo +# end +# CODE +# +# p Parser::Source::Comment.associate(ast, comments) +# # => { +# # (class (const nil :Foo) ...) => +# # [#], +# # (send nil :attr_accessor (sym :foo)) => +# # [#, +# # #] +# # } +# +# @see {associate} +# +# @!attribute skip_directives +# Skip file processing directives disguised as comments. +# Namely: +# +# * Shebang line, +# * Magic encoding comment. +# +# @return [Boolean] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment/associator.rb:45 +class Parser::Source::Comment::Associator + # @param [Parser::AST::Node] ast + # @param [Array] comments + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:51 + def initialize(ast, comments); end + + # Compute a mapping between AST nodes and comments. Comment is + # associated with the node, if it is one of the following types: + # + # - preceding comment, it ends before the node start + # - sparse comment, it is located inside the node, after all child nodes + # - decorating comment, it starts at the same line, where the node ends + # + # This rule is unambiguous and produces the result + # one could reasonably expect; for example, this code + # + # # foo + # hoge # bar + # + fuga + # + # will result in the following association: + # + # { + # (send (lvar :hoge) :+ (lvar :fuga)) => + # [#], + # (lvar :fuga) => + # [#] + # } + # + # Note that comments after the end of the end of a passed tree range are + # ignored (except root decorating comment). + # + # Note that {associate} produces unexpected result for nodes which are + # equal but have distinct locations; comments for these nodes are merged. + # You may prefer using {associate_by_identity} or {associate_locations}. + # + # @return [Hash>] + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:92 + def associate; end + + # Same as {associate}, but compares by identity, thus producing an unambiguous + # result even in presence of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:115 + def associate_by_identity; end + + # Same as {associate}, but uses `node.loc` instead of `node` as + # the hash key, thus producing an unambiguous result even in presence + # of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:104 + def associate_locations; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:182 + def advance_comment; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:214 + def advance_through_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:206 + def associate_and_advance_comment(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:123 + def children_in_source_order(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:187 + def current_comment_before?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:194 + def current_comment_before_end?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:201 + def current_comment_decorates?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:135 + def do_associate; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:166 + def process_leading_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:173 + def process_trailing_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:148 + def visit(node); end +end + +# pkg:gem/parser#lib/parser/source/comment/associator.rb:212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/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. +# +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# @!attribute [r] node +# The node that is described by this map. Nodes and maps have 1:1 correspondence. +# @return [Parser::AST::Node] +# +# @!attribute [r] expression +# @return [Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/map.rb:70 +class Parser::Source::Map + # @param [Range] expression + # + # pkg:gem/parser#lib/parser/source/map.rb:76 + def initialize(expression); end + + # Compares source maps. + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/map.rb:140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:109 + def column; end + + # pkg:gem/parser#lib/parser/source/map.rb:72 + def expression; end + + # pkg:gem/parser#lib/parser/source/map.rb:103 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:117 + def last_line; end + + # A shortcut for `self.expression.line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:99 + def line; end + + # pkg:gem/parser#lib/parser/source/map.rb:71 + def node; end + + # @api private + # + # pkg:gem/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`. + # + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # + # @return [Hash] + # + # pkg:gem/parser#lib/parser/source/map.rb:166 + def to_hash; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:132 + def with_expression(expression_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map.rb:180 + def update_expression(expression_l); end + + # pkg:gem/parser#lib/parser/source/map.rb:176 + def with(&block); end + + private + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:82 + def initialize_copy(other); end +end + +# pkg:gem/parser#lib/parser/source/map/collection.rb:6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/collection.rb:10 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:8 + def end; end +end + +# pkg:gem/parser#lib/parser/source/map/condition.rb:6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/condition.rb:12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:9 + def else; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/constant.rb:6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/constant.rb:11 + def initialize(double_colon, name, expression); end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:7 + def double_colon; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:8 + def name; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/constant.rb:20 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/constant.rb:26 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/definition.rb:6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/definition.rb:12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/for.rb:6 +class Parser::Source::Map::For < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/for.rb:10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def in; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/heredoc.rb:6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:10 + def initialize(begin_l, body_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:7 + def heredoc_body; end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:8 + def heredoc_end; end +end + +# pkg:gem/parser#lib/parser/source/map/index.rb:6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/index.rb:11 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/index.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/index.rb:21 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/index.rb:27 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/keyword.rb:6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/keyword.rb:11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:9 + def end; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/method_definition.rb:6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:11 + def assignment; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:9 + def argument; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/operator.rb:6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/operator.rb:9 + def initialize(operator, expression); end + + # pkg:gem/parser#lib/parser/source/map/operator.rb:7 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/rescue_body.rb:6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:8 + def assoc; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:9 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/send.rb:6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/send.rb:13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/send.rb:10 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:7 + def dot; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:11 + def end; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:9 + def operator; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:8 + def selector; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/send.rb:24 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/send.rb:30 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/ternary.rb:6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/ternary.rb:10 + def initialize(question_l, colon_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:8 + def colon; end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:7 + def question; end +end + +# pkg:gem/parser#lib/parser/source/map/variable.rb:6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/variable.rb:10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:7 + def name; end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:8 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/variable.rb:19 + def with_operator(operator_l); end + + protected + + # pkg:gem/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 +# ^^ +# +# @!attribute [r] source_buffer +# @return [Parser::Source::Buffer] +# +# @!attribute [r] begin_pos +# @return [Integer] index of the first character in the range +# +# @!attribute [r] end_pos +# @return [Integer] index of the character after the last character in the range +# +# @api public +# +# pkg:gem/parser#lib/parser/source/range.rb:26 +class Parser::Source::Range + include ::Comparable + + # @param [Buffer] source_buffer + # @param [Integer] begin_pos + # @param [Integer] end_pos + # + # pkg:gem/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. + # + # pkg:gem/parser#lib/parser/source/range.rb:301 + def <=>(other); end + + # @param [Hash] Endpoint(s) 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 + # by the given amount(s) + # + # pkg:gem/parser#lib/parser/source/range.rb:193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:55 + def begin; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def begin_pos; end + + # @return [Integer] zero-based column number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:92 + def column; end + + # @return [::Range] a range of columns spanned by this range. + # @raise RangeError + # + # pkg:gem/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? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/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? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/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? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/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? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:294 + def empty?; end + + # @return [Range] a zero-length range located just after the end + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:63 + def end; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def end_pos; end + + # pkg:gem/parser#lib/parser/source/range.rb:308 + def eql?(_arg0); end + + # pkg:gem/parser#lib/parser/source/range.rb:87 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # pkg:gem/parser#lib/parser/source/range.rb:313 + def hash; end + + # @return [String] a human-readable representation of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:320 + def inspect; end + + # @param [Range] other + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # pkg:gem/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')`. + # + # pkg:gem/parser#lib/parser/source/range.rb:141 + def is?(*what); end + + # @param [Range] other + # @return [Range] smallest possible range spanning both this range and `other`. + # + # pkg:gem/parser#lib/parser/source/range.rb:209 + def join(other); end + + # @return [Integer] zero-based column number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:106 + def last_column; end + + # @return [Integer] line number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:99 + def last_line; end + + # pkg:gem/parser#lib/parser/source/range.rb:74 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @see Buffer + # @return [Integer] line number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @param [Range] other + # @return [Boolean] `true` if this range and `other` overlap + # + # pkg:gem/parser#lib/parser/source/range.rb:250 + def overlaps?(other); end + + # @param [Integer] new_size + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # pkg:gem/parser#lib/parser/source/range.rb:201 + def resize(new_size); end + + # @return [Integer] amount of characters included in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:70 + def size; end + + # @return [String] all source code covered by this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:132 + def source; end + + # pkg:gem/parser#lib/parser/source/range.rb:29 + def source_buffer; end + + # @return [String] a line of source code containing the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:125 + def source_line; end + + # @return [Array] a set of character indexes contained in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:148 + def to_a; end + + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # pkg:gem/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. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/range.rb:173 + def to_s; end + + # @param [Hash] Endpoint(s) 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 + # to the given value(s). + # + # pkg:gem/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 +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# @deprecated Use {TreeRewriter} +# +# pkg:gem/parser#lib/parser/source/rewriter.rb:31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # @deprecated Use {TreeRewriter} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:39 + def initialize(source_buffer); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/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. + # + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/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. + # + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/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. + # + # @return [String] + # @deprecated Use {TreeRewriter#process} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:178 + def process; end + + # Removes the source range. + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#remove} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#replace} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:167 + def replace(range, content); end + + # pkg:gem/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. + # + # @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 + # @deprecated Use {TreeRewriter#transaction} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @param [Range] range + # @param [String] before + # @param [String] after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#wrap} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:94 + def wrap(range, before, after); end + + private + + # pkg:gem/parser#lib/parser/source/rewriter.rb:476 + def active_clobber; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:484 + def active_clobber=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:480 + def active_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:492 + def active_insertions=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:472 + def active_queue; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:500 + def adjacent?(range1, range2); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:351 + def adjacent_insertion_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:366 + def adjacent_insertions?(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:347 + def adjacent_position_mask(range); end + + # pkg:gem/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. + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:280 + def append(action); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:389 + def can_merge?(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:355 + def clobbered_insertion?(insertion); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:343 + def clobbered_position_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:468 + def in_transaction?; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:410 + def merge_actions(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:419 + def merge_actions!(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:425 + def merge_replacements(actions); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:450 + def raise_clobber_error(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:335 + def record_insertion(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:339 + def record_replace(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:445 + def replace_actions(old, updated); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/rewriter/action.rb:9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # pkg:gem/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 + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:24 + def <=>(other); end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def allow_multiple_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:13 + def allow_multiple_insertions?; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def order; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def range; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def replacement; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:30 + def to_s; end +end + +# pkg:gem/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. +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # + # pkg:gem/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. + # + # @return [Array<(Symbol, Range, String{, String})>] + # + # pkg:gem/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` + # + # @return [Array] an ordered list of pairs of range & replacement + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:281 + def as_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @return [Boolean] + # + # pkg:gem/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. + # + # @param [TreeRewriter] rewriter from different source_buffer + # @param [Integer] offset + # @return [Rewriter] self + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:342 + def insert_before_multi(range, text); end + + # pkg:gem/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. + # + # @param [Rewriter] with + # @return [Rewriter] merge of receiver and argument + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/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. + # + # @param [Rewriter] with + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/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. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:193 + def replace(range, content); end + + # pkg:gem/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. + # + # @raise [RuntimeError] when no block is passed + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @param [Range] range + # @param [String, nil] insert_before + # @param [String, nil] insert_after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:206 + def wrap(range, insert_before, insert_after); end + + protected + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:365 + def action_root; end + + private + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:369 + def action_summary; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:392 + def check_policy_validity; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:404 + def check_range_validity(range); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:397 + def combine(range, attributes); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:411 + def enforce_policy(event); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# Actions are arranged in a tree and get combined so that: +# +# * Children are strictly contained by their parent +# * Siblings are all disjointed from one another and ordered +# * Only actions with `replacement == nil` may have children +# +# pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:14 +class Parser::Source::TreeRewriter::Action + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:29 + def combine(action); end + + # A root action has its range set to the whole source range, even + # though it typically does not act on that range. + # This method returns the action as if it was a child action with + # its range contracted. + # @return [Action] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:68 + def contract; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:34 + def empty?; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_after; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_before; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:58 + def insertion?; end + + # @return [Action] that has been moved to the given source_buffer and with the given offset + # No check is done on validity of resulting range. + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:81 + def moved(source_buffer, offset); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:50 + def nested_actions; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:41 + def ordered_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def range; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def replacement; end + + protected + + # Returns the children in a hierarchy with respect to `action`: + # :sibbling_left, sibbling_right (for those that are disjoint from `action`) + # :parent (in case one of our children contains `action`) + # :child (in case `action` strictly contains some of our children) + # :fusible (in case `action` overlaps some children but they can be fused in one deletion) + # or raises a `CloberingError` + # In case a child has equal range to `action`, it is returned as `:parent` + # Reminder: an empty range 1...1 is considered disjoint from 1...10 + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:159 + def analyse_hierarchy(action); end + + # Similar to @children.bsearch_index || size + # except allows for a starting point + # and `bsearch_index` is only Ruby 2.3+ + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:225 + def call_enforcer_for_merge(action); end + + # @param [Array(Action | nil)] fusible + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:205 + def check_fusible(action, *fusible); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:95 + def children; end + + # Assumes `more_children` all contained within `@range` + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:130 + def combine_children(more_children); end + + # Assumes range.contains?(action.range) && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:103 + def do_combine(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:136 + def fuse_deletions(action, fusible, other_sibblings); end + + # Assumes action.range == range && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:216 + def merge(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:111 + def place_in_hierarchy(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:233 + def swallow(children); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/static_environment.rb:5 +class Parser::StaticEnvironment + # pkg:gem/parser#lib/parser/static_environment.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/static_environment.rb:55 + def declare(name); end + + # Anonymous blockarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:95 + def declare_anonymous_restarg; end + + # Forward args + # + # pkg:gem/parser#lib/parser/static_environment.rb:67 + def declare_forward_args; end + + # pkg:gem/parser#lib/parser/static_environment.rb:61 + def declared?(name); end + + # pkg:gem/parser#lib/parser/static_environment.rb:81 + def declared_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:117 + def declared_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:99 + def declared_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:103 + def declared_anonymous_restarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:71 + def declared_forward_args?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:129 + def empty?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:33 + def extend_dynamic; end + + # pkg:gem/parser#lib/parser/static_environment.rb:26 + def extend_static; end + + # pkg:gem/parser#lib/parser/static_environment.rb:89 + def parent_has_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:125 + def parent_has_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:107 + def parent_has_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:21 + def reset; end + + # pkg:gem/parser#lib/parser/static_environment.rb:49 + def unextend; end +end + +# pkg:gem/parser#lib/parser/static_environment.rb:15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/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 +# +# @!attribute [r] diagnostic +# @return [Parser::Diagnostic] +# +# pkg:gem/parser#lib/parser/syntax_error.rb:13 +class Parser::SyntaxError < ::StandardError + # pkg:gem/parser#lib/parser/syntax_error.rb:16 + def initialize(diagnostic); end + + # pkg:gem/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 +# +# pkg:gem/parser#lib/parser/tree_rewriter.rb:51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:108 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/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. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @param [Symbol] crossing_deletions:, different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# pkg:gem/parser#lib/parser/unknown_encoding_in_magic_comment_error.rb:13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# pkg:gem/parser#lib/parser/version.rb:4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/variables_stack.rb:5 +class Parser::VariablesStack + # pkg:gem/parser#lib/parser/variables_stack.rb:6 + def initialize; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:27 + def declare(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:31 + def declared?(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:11 + def empty?; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:19 + def pop; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:15 + def push; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:23 + def reset; end +end diff --git a/sorbet/rbi/gems/prism@1.9.0.rbi b/sorbet/rbi/gems/prism@1.9.0.rbi new file mode 100644 index 00000000..475c5968 --- /dev/null +++ b/sorbet/rbi/gems/prism@1.9.0.rbi @@ -0,0 +1,42224 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +class Parser::Base; end + +# pkg:gem/prism#lib/prism/translation/parser.rb:30 +class Parser::Diagnostic; end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dispatcher.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dsl.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/inspect_visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/mutation_compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/node.rb.erb +# if you are looking to modify the template +# ++ +# =end +# -- +# Here we are reopening the prism module to provide methods on nodes that aren't +# templated and are meant as convenience methods. +# ++ +# +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/reflection.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# :markup: markdown +# +# :markup: markdown +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# +# pkg:gem/prism#lib/prism.rb:9 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. + # + # For supported options, see Prism::parse. + # + # pkg:gem/prism#lib/prism.rb:65 + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def lex_file(*_arg0); end + + # :call-seq: + # Prism::load(source, serialized, freeze) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # pkg:gem/prism#lib/prism.rb:73 + sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) } + def load(source, serialized, freeze = false); end + + # Mirror the Prism.parse API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_failure?(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def parse_success?(*_arg0); end + + # Mirror the Prism.profile API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def profile(*_arg0); end + + # Mirror the Prism.profile_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 + def profile_file(*_arg0); end + + # Create a new scope with the given locals and forwarding options that is + # suitable for passing into one of the Prism.* methods that accepts the + # `scopes` option. + # + # pkg:gem/prism#lib/prism/parse_result.rb:904 + sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).returns(Prism::Scope) } + def scope(locals: [], forwarding: []); end + end +end + +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. +# +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. +# +# pkg:gem/prism#lib/prism/parse_result.rb:250 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:257 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:252 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # pkg:gem/prism#lib/prism/parse_result.rb:274 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentially the same as `Prism::Source#column`. + # + # pkg:gem/prism#lib/prism/parse_result.rb:281 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # pkg:gem/prism#lib/prism/parse_result.rb:267 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:334 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # Initialize a new AliasGlobalVariableNode node. + # + # pkg:gem/prism#lib/prism/node.rb:336 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:437 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:347 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:352 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:370 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:365 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode + # + # pkg:gem/prism#lib/prism/node.rb:375 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, new_name: self.new_name, old_name: self.old_name, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:380 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:383 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:357 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:421 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:416 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:403 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the global variable that can be used after aliasing. + # + # alias $foo $bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:391 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } + def new_name; end + + # Represents the old name of the global variable that can be used before aliasing. + # + # alias $foo $bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:397 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end + def old_name; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:411 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:426 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:431 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:449 +class Prism::AliasMethodNode < ::Prism::Node + # Initialize a new AliasMethodNode node. + # + # pkg:gem/prism#lib/prism/node.rb:451 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:564 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:462 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:467 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode + # + # pkg:gem/prism#lib/prism/node.rb:490 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, new_name: self.new_name, old_name: self.old_name, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:495 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:472 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:548 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:543 + sig { returns(String) } + def keyword; end + + # Represents the location of the `alias` keyword. + # + # alias foo bar + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:530 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:512 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } + def new_name; end + + # Represents the old name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:524 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:538 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:553 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:558 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:576 +class Prism::AlternationPatternNode < ::Prism::Node + # Initialize a new AlternationPatternNode node. + # + # pkg:gem/prism#lib/prism/node.rb:578 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:679 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:589 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:607 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode + # + # pkg:gem/prism#lib/prism/node.rb:617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:622 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:599 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:663 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. + # + # foo => bar | baz + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:633 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:658 + sig { returns(String) } + def operator; end + + # Represents the alternation operator location. + # + # foo => bar | baz + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:645 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # foo => bar | baz + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:639 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:653 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:668 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:673 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:691 +class Prism::AndNode < ::Prism::Node + # Initialize a new AndNode node. + # + # pkg:gem/prism#lib/prism/node.rb:693 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:800 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:704 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:709 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:727 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:722 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode + # + # pkg:gem/prism#lib/prism/node.rb:732 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:737 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:740 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:714 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:784 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:751 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:779 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:766 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:760 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:774 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:789 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:794 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:812 +class Prism::ArgumentsNode < ::Prism::Node + # Initialize a new ArgumentsNode node. + # + # pkg:gem/prism#lib/prism/node.rb:814 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:910 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:823 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The list of arguments, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(bar, baz) + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:891 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:828 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:845 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:840 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_forwarding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:863 + sig { returns(T::Boolean) } + def contains_forwarding?; end + + # def contains_keyword_splat?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:873 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:868 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def contains_multiple_splats?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:883 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:878 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode + # + # pkg:gem/prism#lib/prism/node.rb:850 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } + # + # pkg:gem/prism#lib/prism/node.rb:858 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:833 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:894 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:899 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:904 + def type; end + end +end + +# Flags for arguments nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19780 +module Prism::ArgumentsNodeFlags; end + +# if the arguments contain forwarding +# +# pkg:gem/prism#lib/prism/node.rb:19782 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# pkg:gem/prism#lib/prism/node.rb:19785 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a keyword splat +# +# pkg:gem/prism#lib/prism/node.rb:19788 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# if the arguments contain multiple splats +# +# pkg:gem/prism#lib/prism/node.rb:19794 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# pkg:gem/prism#lib/prism/node.rb:19791 +Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:922 +class Prism::ArrayNode < ::Prism::Node + # Initialize a new ArrayNode node. + # + # pkg:gem/prism#lib/prism/node.rb:924 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1057 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:935 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:940 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1036 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # pkg:gem/prism#lib/prism/node.rb:1012 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:957 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:952 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:975 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode + # + # pkg:gem/prism#lib/prism/node.rb:962 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, elements: self.elements, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:967 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:970 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:945 + def each_child_node; end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # pkg:gem/prism#lib/prism/node.rb:980 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1041 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1031 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # pkg:gem/prism#lib/prism/node.rb:988 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1026 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1002 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1046 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1051 + def type; end + end +end + +# Flags for array nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19798 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# pkg:gem/prism#lib/prism/node.rb:19800 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *bar +# ^^^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1083 +class Prism::ArrayPatternNode < ::Prism::Node + # Initialize a new ArrayPatternNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1085 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1247 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1099 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1104 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1226 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the closing location of the array pattern. + # + # foo in [1, 2] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1202 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1129 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1119 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the Array + # + # foo in Bar[] + # ^^^ + # + # foo in Bar[1, 2, 3] + # ^^^ + # + # foo in Bar::Baz[1, 2, 3] + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1156 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # + # pkg:gem/prism#lib/prism/node.rb:1134 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, requireds: self.requireds, rest: self.rest, posts: self.posts, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1139 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:1142 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1109 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1231 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1221 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the opening location of the array pattern. + # + # foo in [1, 2] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1180 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the elements after the rest element of the array pattern. + # + # foo in *bar, baz + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1174 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # Represents the required elements of the array pattern. + # + # foo in [1, 2] + # ^ ^ + # + # pkg:gem/prism#lib/prism/node.rb:1162 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # Represents the rest element of the array pattern. + # + # foo in *bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1168 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1216 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1194 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1236 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1241 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1264 +class Prism::AssocNode < ::Prism::Node + # Initialize a new AssocNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1266 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, key, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1382 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1277 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1282 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1300 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1295 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode + # + # pkg:gem/prism#lib/prism/node.rb:1305 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, key: self.key, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1310 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:1313 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1287 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1366 + sig { override.returns(String) } + def inspect; end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1327 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1361 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:1342 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1356 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1371 + sig { override.returns(Symbol) } + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1336 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1376 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1394 +class Prism::AssocSplatNode < ::Prism::Node + # Initialize a new AssocSplatNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1396 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1491 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1406 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1411 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1430 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1423 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode + # + # pkg:gem/prism#lib/prism/node.rb:1435 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1440 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:1443 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1416 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1475 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:1470 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:1457 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1465 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1480 + sig { override.returns(Symbol) } + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1451 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1485 + def type; end + end +end + +# pkg:gem/prism#lib/prism.rb:90 +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# pkg:gem/prism#lib/prism/node.rb:1502 +class Prism::BackReferenceReadNode < ::Prism::Node + # Initialize a new BackReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1504 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1513 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1534 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1529 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode + # + # pkg:gem/prism#lib/prism/node.rb:1539 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:1547 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1523 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1559 + sig { override.returns(String) } + def inspect; end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # pkg:gem/prism#lib/prism/node.rb:1556 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1564 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1569 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# pkg:gem/prism#lib/prism/visitor.rb:17 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # pkg:gem/prism#lib/prism/visitor.rb:20 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # pkg:gem/prism#lib/prism/visitor.rb:26 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # pkg:gem/prism#lib/prism/visitor.rb:32 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1587 +class Prism::BeginNode < ::Prism::Node + # Initialize a new BeginNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1589 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1745 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1603 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1719 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # Represents the location of the `begin` keyword. + # + # begin x end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1654 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1608 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1633 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode + # + # pkg:gem/prism#lib/prism/node.rb:1638 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, begin_keyword_loc: self.begin_keyword_loc, statements: self.statements, rescue_clause: self.rescue_clause, else_clause: self.else_clause, ensure_clause: self.ensure_clause, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:1646 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1613 + def each_child_node; end + + # Represents the else clause within the begin block. + # + # begin x; rescue y; else z; end + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1688 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:1724 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # begin x end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1700 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # Represents the ensure clause within the begin block. + # + # begin x; ensure y; end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1694 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1729 + sig { override.returns(String) } + def inspect; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:80 + def newline_flag!(lines); end + + # Represents the rescue clause within the begin block. + # + # begin x; rescue y; end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1682 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # Save the begin_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1668 + def save_begin_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1714 + def save_end_keyword_loc(repository); end + + # Represents the statements within the begin block. + # + # begin x end + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1676 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1734 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1739 + def type; end + end +end + +# Represents a block argument using `&`. +# +# bar(&args) +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1760 +class Prism::BlockArgumentNode < ::Prism::Node + # Initialize a new BlockArgumentNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1772 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1777 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1796 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode + # + # pkg:gem/prism#lib/prism/node.rb:1801 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:1809 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1782 + def each_child_node; end + + # The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(&args) + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1817 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1841 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:1836 + sig { returns(String) } + def operator; end + + # Represents the location of the `&` operator. + # + # foo(&args) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1823 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:1831 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1851 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# pkg:gem/prism#lib/prism/node.rb:1868 +class Prism::BlockLocalVariableNode < ::Prism::Node + # Initialize a new BlockLocalVariableNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1870 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:1945 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1879 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1884 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1900 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1895 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode + # + # pkg:gem/prism#lib/prism/node.rb:1905 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:1913 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1889 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:1929 + sig { override.returns(String) } + def inspect; end + + # The name of the block local variable. + # + # a { |; b| } # name `:b` + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:1926 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:1918 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:1934 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:1939 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:1956 +class Prism::BlockNode < ::Prism::Node + # Initialize a new BlockNode node. + # + # pkg:gem/prism#lib/prism/node.rb:1958 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:2095 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:1971 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The body of the block. + # + # [1, 2, 3].each { |i| puts x } + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2034 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:1976 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:2074 + sig { returns(String) } + def closing; end + + # Represents the location of the closing `}` or `end`. + # + # [1, 2, 3].each { |i| puts x } + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2056 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:1997 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:1989 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode + # + # pkg:gem/prism#lib/prism/node.rb:2002 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, parameters: self.parameters, body: self.body, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2007 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:2010 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1981 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:2079 + sig { override.returns(String) } + def inspect; end + + # The local variables declared in the block. + # + # [1, 2, 3].each { |i| puts x } # locals: [:i] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2018 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:2069 + sig { returns(String) } + def opening; end + + # Represents the location of the opening `{` or `do`. + # + # [1, 2, 3].each { |i| puts x } + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2040 + sig { returns(Prism::Location) } + def opening_loc; end + + # The parameters of the block. + # + # [1, 2, 3].each { |i| puts x } + # ^^^ + # [1, 2, 3].each { puts _1 } + # ^^^^^^^^^^^ + # [1, 2, 3].each { puts it } + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2028 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2064 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2048 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:2084 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:2089 + def type; end + end +end + +# Represents a block parameter of a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:2111 +class Prism::BlockParameterNode < ::Prism::Node + # Initialize a new BlockParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:2113 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:2235 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:2124 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2129 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:2145 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:2140 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:2150 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2155 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:2158 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2134 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:2219 + sig { override.returns(String) } + def inspect; end + + # The name of the block parameter. + # + # def a(&b) # name `:b` + # ^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2172 + sig { returns(T.nilable(Symbol)) } + def name; end + + # Represents the location of the block parameter name. + # + # def a(&b) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2178 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:2214 + sig { returns(String) } + def operator; end + + # Represents the location of the `&` operator. + # + # def a(&b) + # ^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2201 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2163 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2192 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2209 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:2224 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:2229 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:2252 +class Prism::BlockParametersNode < ::Prism::Node + # Initialize a new BlockParametersNode node. + # + # pkg:gem/prism#lib/prism/node.rb:2254 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:2408 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:2266 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2271 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2387 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the closing location of the block parameters. + # + # -> (a, b = 1; local) { } + # ^ + # + # foo do |a, b = 1; local| + # ^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2363 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:2292 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:2284 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode + # + # pkg:gem/prism#lib/prism/node.rb:2297 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parameters: self.parameters, locals: self.locals, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2302 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:2305 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2276 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:2392 + sig { override.returns(String) } + def inspect; end + + # Represents the local variables of the block. + # + # -> (a, b = 1; local) { } + # ^^^^^ + # + # foo do |a, b = 1; local| + # ^^^^^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2327 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2382 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the opening location of the block parameters. + # + # -> (a, b = 1; local) { } + # ^ + # + # foo do |a, b = 1; local| + # ^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2337 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the parameters of the block. + # + # -> (a, b = 1; local) { } + # ^^^^^^^^ + # + # foo do |a, b = 1; local| + # ^^^^^^^^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:2317 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2377 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2351 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:2397 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:2402 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:2422 +class Prism::BreakNode < ::Prism::Node + # Initialize a new BreakNode node. + # + # pkg:gem/prism#lib/prism/node.rb:2424 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:2519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:2434 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2479 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2439 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:2458 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:2451 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode + # + # pkg:gem/prism#lib/prism/node.rb:2463 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2468 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:2471 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2444 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:2503 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:2498 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2485 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2493 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:2508 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:2513 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:2530 +class Prism::CallAndWriteNode < ::Prism::Node + # Initialize a new CallAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:2532 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:2726 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:2547 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2601 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2695 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar &&= value + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2620 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:2573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:2565 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:2578 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2583 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:2586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2557 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2606 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:2710 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2700 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar &&= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2642 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:2705 + sig { returns(String) } + def operator; end + + # Represents the location of the operator. + # + # foo.bar &&= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2676 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar &&= value # read_name `:bar` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2664 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar &&= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2614 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2591 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2634 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2656 + def save_message_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2684 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:2715 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar &&= value + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2692 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2596 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar &&= value # write_name `:bar=` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2670 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:2720 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:2758 +class Prism::CallNode < ::Prism::Node + # Initialize a new CallNode node. + # + # pkg:gem/prism#lib/prism/node.rb:2760 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, equal_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3029 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:2777 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Represents the arguments to the method call. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(bar) + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2932 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2833 + sig { returns(T::Boolean) } + def attribute_write?; end + + # Represents the block that is being passed to the method. + # + # foo { |a| a } + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2985 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2988 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar + # ^ + # + # foo&.bar + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:2861 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2782 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3003 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the location of the right parenthesis. + # + # foo(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2938 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:2805 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:2796 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode + # + # pkg:gem/prism#lib/prism/node.rb:2810 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, equal_loc: self.equal_loc, block: self.block); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:2815 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # pkg:gem/prism#lib/prism/node.rb:2818 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2787 + def each_child_node; end + + # def equal: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3008 + sig { returns(T.nilable(String)) } + def equal; end + + # Represents the location of the equal sign, in the case that this is an attribute write. + # + # foo.bar = value + # ^ + # + # foo[bar] = value + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2963 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # pkg:gem/prism#lib/prism/node_ext.rb:334 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2838 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3013 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2993 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2889 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Represents the name of the method being called. + # + # foo.bar # name `:foo` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2883 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:2998 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the location of the left parenthesis. + # foo(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2910 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:2852 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2823 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2875 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2952 + def save_closing_loc(repository); end + + # Save the equal_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2977 + def save_equal_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2903 + def save_message_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2924 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3018 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:2828 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3023 + def type; end + end +end + +# Flags for call nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19804 +module Prism::CallNodeFlags; end + +# a call that is an attribute write, so the value being written should be returned +# +# pkg:gem/prism#lib/prism/node.rb:19812 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# pkg:gem/prism#lib/prism/node.rb:19815 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# pkg:gem/prism#lib/prism/node.rb:19806 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# pkg:gem/prism#lib/prism/node.rb:19809 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3048 +class Prism::CallOperatorWriteNode < ::Prism::Node + # Initialize a new CallOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3050 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3246 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3066 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3120 + sig { returns(T::Boolean) } + def attribute_write?; end + + # Represents the binary operator being used. + # + # foo.bar += value # binary_operator `:+` + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:3195 + sig { returns(Symbol) } + def binary_operator; end + + # Represents the location of the binary operator. + # + # foo.bar += value + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:3201 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3220 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar += value + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:3139 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3071 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3092 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3084 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:3097 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3102 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:3105 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3076 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3125 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3230 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3225 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar += value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3161 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:342 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:349 + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar += value # read_name `:bar` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3183 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar += value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3133 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3110 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3209 + def save_binary_operator_loc(repository); end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3153 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3175 + def save_message_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3235 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar += value + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3217 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3115 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar += value # write_name `:bar=` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3189 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3240 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3264 +class Prism::CallOrWriteNode < ::Prism::Node + # Initialize a new CallOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3266 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3460 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3281 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3335 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3429 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar ||= value + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:3354 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3286 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3307 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3299 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:3312 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3317 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:3320 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3291 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3340 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3444 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3434 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar ||= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3376 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3439 + sig { returns(String) } + def operator; end + + # Represents the location of the operator. + # + # foo.bar ||= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3410 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar ||= value # read_name `:bar` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3398 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar ||= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3348 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3325 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3368 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3390 + def save_message_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3418 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3449 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar ||= value + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3426 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3330 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar ||= value # write_name `:bar=` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3404 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3454 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3485 +class Prism::CallTargetNode < ::Prism::Node + # Initialize a new CallTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3629 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3549 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3603 + sig { returns(String) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar = 1 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:3568 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3521 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3516 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:3526 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:3534 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3509 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3554 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3613 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3608 + sig { returns(String) } + def message; end + + # Represents the location of the message. + # + # foo.bar = 1 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3590 + sig { returns(Prism::Location) } + def message_loc; end + + # Represents the name of the method being called. + # + # foo.bar = 1 # name `:foo` + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3584 + sig { returns(Symbol) } + def name; end + + # The object that the method is being called on. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar = 1 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3562 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3539 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3576 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3598 + def save_message_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3618 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:3544 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3623 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3643 +class Prism::CapturePatternNode < ::Prism::Node + # Initialize a new CapturePatternNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3645 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, target, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3746 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3656 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3661 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3679 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3674 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode + # + # pkg:gem/prism#lib/prism/node.rb:3684 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, target: self.target, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:3692 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3666 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3730 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3725 + sig { returns(String) } + def operator; end + + # Represents the location of the `=>` operator. + # + # foo => bar + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:3712 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3720 + def save_operator_loc(repository); end + + # Represents the target of the capture. + # + # foo => bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3706 + sig { returns(Prism::LocalVariableTargetNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3735 + sig { override.returns(Symbol) } + def type; end + + # Represents the value to capture. + # + # foo => bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3700 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3740 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3760 +class Prism::CaseMatchNode < ::Prism::Node + # Initialize a new CaseMatchNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:3897 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3871 + sig { returns(String) } + def case_keyword; end + + # Represents the location of the `case` keyword. + # + # case true; in false; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3842 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3803 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3794 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the conditions of the case match. + # + # case true; in false; end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3830 + sig { returns(T::Array[Prism::InNode]) } + def conditions; end + + # Returns the else clause of the case match node. This method is deprecated + # in favor of #else_clause. + # + # pkg:gem/prism#lib/prism/node_ext.rb:470 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode + # + # pkg:gem/prism#lib/prism/node.rb:3808 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, predicate: self.predicate, conditions: self.conditions, else_clause: self.else_clause, case_keyword_loc: self.case_keyword_loc, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3813 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:3816 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3785 + def each_child_node; end + + # Represents the else clause of the case match. + # + # case true; in false; else; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3836 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:3876 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # case true; in false; end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3858 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:3881 + sig { override.returns(String) } + def inspect; end + + # Represents the predicate of the case match. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # case true; in false; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3824 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Save the case_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3850 + def save_case_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:3866 + def save_end_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:3886 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:3891 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:3914 +class Prism::CaseNode < ::Prism::Node + # Initialize a new CaseNode node. + # + # pkg:gem/prism#lib/prism/node.rb:3916 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:3929 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4025 + sig { returns(String) } + def case_keyword; end + + # Represents the location of the `case` keyword. + # + # case true; when false; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3996 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3934 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:3957 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:3948 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the conditions of the case statement. + # + # case true; when false; end + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3984 + sig { returns(T::Array[Prism::WhenNode]) } + def conditions; end + + # Returns the else clause of the case node. This method is deprecated in + # favor of #else_clause. + # + # pkg:gem/prism#lib/prism/node_ext.rb:479 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode + # + # pkg:gem/prism#lib/prism/node.rb:3962 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, predicate: self.predicate, conditions: self.conditions, else_clause: self.else_clause, case_keyword_loc: self.case_keyword_loc, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:3967 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:3970 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3939 + def each_child_node; end + + # Represents the else clause of the case statement. + # + # case true; when false; else; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3990 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4030 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # case true; when false; end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4012 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4035 + sig { override.returns(String) } + def inspect; end + + # Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # case true; when false; end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:3978 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Save the case_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4004 + def save_case_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4020 + def save_end_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4040 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4045 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4066 +class Prism::ClassNode < ::Prism::Node + # Initialize a new ClassNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4068 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4239 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Represents the body of the class. + # + # class Foo + # foo + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4184 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4208 + sig { returns(String) } + def class_keyword; end + + # Represents the location of the `class` keyword. + # + # class Foo end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4136 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4112 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4103 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode + # + # pkg:gem/prism#lib/prism/node.rb:4149 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode + # + # pkg:gem/prism#lib/prism/node.rb:4117 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, class_keyword_loc: self.class_keyword_loc, constant_path: self.constant_path, inheritance_operator_loc: self.inheritance_operator_loc, superclass: self.superclass, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4122 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:4125 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4094 + def each_child_node; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4218 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # class Foo end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4190 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:4213 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # Represents the location of the `<` operator. + # + # class Foo < Bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:4155 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4223 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:4130 + sig { returns(T::Array[Symbol]) } + def locals; end + + # The name of the class. + # + # class Foo end # name `:Foo` + # + # pkg:gem/prism#lib/prism/node.rb:4205 + sig { returns(Symbol) } + def name; end + + # Save the class_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4144 + def save_class_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4198 + def save_end_keyword_loc(repository); end + + # Save the inheritance_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4169 + def save_inheritance_operator_loc(repository); end + + # Represents the superclass of the class. + # + # class Foo < Bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4177 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4228 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4233 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4257 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # Initialize a new ClassVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4259 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4376 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4271 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4276 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4293 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4288 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:4298 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4303 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:4306 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:165 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4281 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4360 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@target &&= value # name `:@@target` + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4314 + sig { returns(Symbol) } + def name; end + + # Represents the location of the variable name. + # + # @@target &&= value + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4320 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4355 + sig { returns(String) } + def operator; end + + # Represents the location of the `&&=` operator. + # + # @@target &&= value + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4336 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4328 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4344 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4365 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@target &&= value + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4352 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4370 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4389 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # Initialize a new ClassVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4391 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4495 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:4476 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4460 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4426 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4421 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:4431 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:4439 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:177 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4414 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4479 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:4444 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4447 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:358 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:365 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4468 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4455 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4484 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:4473 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4489 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4509 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # Initialize a new ClassVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4511 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4616 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4523 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4528 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4545 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4540 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:4550 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4555 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:4558 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:171 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4533 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4600 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:4563 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4566 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4595 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4579 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4574 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4587 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4605 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:4592 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4610 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4629 +class Prism::ClassVariableReadNode < ::Prism::Node + # Initialize a new ClassVariableReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4631 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4702 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4640 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4645 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4661 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4656 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode + # + # pkg:gem/prism#lib/prism/node.rb:4666 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4671 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:4674 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4650 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4686 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # pkg:gem/prism#lib/prism/node.rb:4683 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4691 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4696 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4712 +class Prism::ClassVariableTargetNode < ::Prism::Node + # Initialize a new ClassVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4714 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4781 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4744 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4739 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:4749 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4754 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:4757 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4733 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4765 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:4762 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4770 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4775 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4791 +class Prism::ClassVariableWriteNode < ::Prism::Node + # Initialize a new ClassVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4793 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:4914 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4827 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4822 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:4832 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4837 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:4840 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4815 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:4898 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # pkg:gem/prism#lib/prism/node.rb:4849 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4855 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:4893 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:4880 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4863 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4888 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:4903 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4874 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:4908 + def type; end + end +end + +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# pkg:gem/prism#lib/prism/parse_result.rb:186 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:212 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:226 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# pkg:gem/prism#lib/prism/parse_result.rb:198 +class Prism::CodeUnitsCache::LengthCounter + # pkg:gem/prism#lib/prism/parse_result.rb:199 + def initialize(source, encoding); end + + # pkg:gem/prism#lib/prism/parse_result.rb:204 + def count(byte_offset, byte_length); end +end + +# pkg:gem/prism#lib/prism/parse_result.rb:187 +class Prism::CodeUnitsCache::UTF16Counter + # pkg:gem/prism#lib/prism/parse_result.rb:188 + def initialize(source, encoding); end + + # pkg:gem/prism#lib/prism/parse_result.rb:193 + def count(byte_offset, byte_length); end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# pkg:gem/prism#lib/prism/parse_result.rb:521 +class Prism::Comment + abstract! + + # Create a new comment object with the given location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:526 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:531 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:523 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:536 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# pkg:gem/prism#lib/prism/compiler.rb:30 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # pkg:gem/prism#lib/prism/compiler.rb:32 + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } + def visit(node); end + + # Compile a AliasGlobalVariableNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:47 + def visit_alias_global_variable_node(node); end + + # Compile a AliasMethodNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:52 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # pkg:gem/prism#lib/prism/compiler.rb:37 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } + def visit_all(nodes); end + + # Compile a AlternationPatternNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:57 + def visit_alternation_pattern_node(node); end + + # Compile a AndNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:62 + def visit_and_node(node); end + + # Compile a ArgumentsNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:67 + def visit_arguments_node(node); end + + # Compile a ArrayNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:72 + def visit_array_node(node); end + + # Compile a ArrayPatternNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:77 + def visit_array_pattern_node(node); end + + # Compile a AssocNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:82 + def visit_assoc_node(node); end + + # Compile a AssocSplatNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:87 + def visit_assoc_splat_node(node); end + + # Compile a BackReferenceReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:92 + def visit_back_reference_read_node(node); end + + # Compile a BeginNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:97 + def visit_begin_node(node); end + + # Compile a BlockArgumentNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:102 + def visit_block_argument_node(node); end + + # Compile a BlockLocalVariableNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:107 + def visit_block_local_variable_node(node); end + + # Compile a BlockNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:112 + def visit_block_node(node); end + + # Compile a BlockParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:117 + def visit_block_parameter_node(node); end + + # Compile a BlockParametersNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:122 + def visit_block_parameters_node(node); end + + # Compile a BreakNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:127 + def visit_break_node(node); end + + # Compile a CallAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:132 + def visit_call_and_write_node(node); end + + # Compile a CallNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:137 + def visit_call_node(node); end + + # Compile a CallOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:142 + def visit_call_operator_write_node(node); end + + # Compile a CallOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:147 + def visit_call_or_write_node(node); end + + # Compile a CallTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:152 + def visit_call_target_node(node); end + + # Compile a CapturePatternNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:157 + def visit_capture_pattern_node(node); end + + # Compile a CaseMatchNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:162 + def visit_case_match_node(node); end + + # Compile a CaseNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:167 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # pkg:gem/prism#lib/prism/compiler.rb:42 + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } + def visit_child_nodes(node); end + + # Compile a ClassNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:172 + def visit_class_node(node); end + + # Compile a ClassVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:177 + def visit_class_variable_and_write_node(node); end + + # Compile a ClassVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:182 + def visit_class_variable_operator_write_node(node); end + + # Compile a ClassVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:187 + def visit_class_variable_or_write_node(node); end + + # Compile a ClassVariableReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:192 + def visit_class_variable_read_node(node); end + + # Compile a ClassVariableTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:197 + def visit_class_variable_target_node(node); end + + # Compile a ClassVariableWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:202 + def visit_class_variable_write_node(node); end + + # Compile a ConstantAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:207 + def visit_constant_and_write_node(node); end + + # Compile a ConstantOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:212 + def visit_constant_operator_write_node(node); end + + # Compile a ConstantOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:217 + def visit_constant_or_write_node(node); end + + # Compile a ConstantPathAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:222 + def visit_constant_path_and_write_node(node); end + + # Compile a ConstantPathNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:227 + def visit_constant_path_node(node); end + + # Compile a ConstantPathOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:232 + def visit_constant_path_operator_write_node(node); end + + # Compile a ConstantPathOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:237 + def visit_constant_path_or_write_node(node); end + + # Compile a ConstantPathTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:242 + def visit_constant_path_target_node(node); end + + # Compile a ConstantPathWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:247 + def visit_constant_path_write_node(node); end + + # Compile a ConstantReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:252 + def visit_constant_read_node(node); end + + # Compile a ConstantTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:257 + def visit_constant_target_node(node); end + + # Compile a ConstantWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:262 + def visit_constant_write_node(node); end + + # Compile a DefNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:267 + def visit_def_node(node); end + + # Compile a DefinedNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:272 + def visit_defined_node(node); end + + # Compile a ElseNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:277 + def visit_else_node(node); end + + # Compile a EmbeddedStatementsNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:282 + def visit_embedded_statements_node(node); end + + # Compile a EmbeddedVariableNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:287 + def visit_embedded_variable_node(node); end + + # Compile a EnsureNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:292 + def visit_ensure_node(node); end + + # Compile a FalseNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:297 + def visit_false_node(node); end + + # Compile a FindPatternNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:302 + def visit_find_pattern_node(node); end + + # Compile a FlipFlopNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:307 + def visit_flip_flop_node(node); end + + # Compile a FloatNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:312 + def visit_float_node(node); end + + # Compile a ForNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:317 + def visit_for_node(node); end + + # Compile a ForwardingArgumentsNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:322 + def visit_forwarding_arguments_node(node); end + + # Compile a ForwardingParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:327 + def visit_forwarding_parameter_node(node); end + + # Compile a ForwardingSuperNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:332 + def visit_forwarding_super_node(node); end + + # Compile a GlobalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:337 + def visit_global_variable_and_write_node(node); end + + # Compile a GlobalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:342 + def visit_global_variable_operator_write_node(node); end + + # Compile a GlobalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:347 + def visit_global_variable_or_write_node(node); end + + # Compile a GlobalVariableReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:352 + def visit_global_variable_read_node(node); end + + # Compile a GlobalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:357 + def visit_global_variable_target_node(node); end + + # Compile a GlobalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:362 + def visit_global_variable_write_node(node); end + + # Compile a HashNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:367 + def visit_hash_node(node); end + + # Compile a HashPatternNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:372 + def visit_hash_pattern_node(node); end + + # Compile a IfNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:377 + def visit_if_node(node); end + + # Compile a ImaginaryNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:382 + def visit_imaginary_node(node); end + + # Compile a ImplicitNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:387 + def visit_implicit_node(node); end + + # Compile a ImplicitRestNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:392 + def visit_implicit_rest_node(node); end + + # Compile a InNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:397 + def visit_in_node(node); end + + # Compile a IndexAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:402 + def visit_index_and_write_node(node); end + + # Compile a IndexOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:407 + def visit_index_operator_write_node(node); end + + # Compile a IndexOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:412 + def visit_index_or_write_node(node); end + + # Compile a IndexTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:417 + def visit_index_target_node(node); end + + # Compile a InstanceVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:422 + def visit_instance_variable_and_write_node(node); end + + # Compile a InstanceVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:427 + def visit_instance_variable_operator_write_node(node); end + + # Compile a InstanceVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:432 + def visit_instance_variable_or_write_node(node); end + + # Compile a InstanceVariableReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:437 + def visit_instance_variable_read_node(node); end + + # Compile a InstanceVariableTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:442 + def visit_instance_variable_target_node(node); end + + # Compile a InstanceVariableWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:447 + def visit_instance_variable_write_node(node); end + + # Compile a IntegerNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:452 + def visit_integer_node(node); end + + # Compile a InterpolatedMatchLastLineNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:457 + def visit_interpolated_match_last_line_node(node); end + + # Compile a InterpolatedRegularExpressionNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:462 + def visit_interpolated_regular_expression_node(node); end + + # Compile a InterpolatedStringNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:467 + def visit_interpolated_string_node(node); end + + # Compile a InterpolatedSymbolNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:472 + def visit_interpolated_symbol_node(node); end + + # Compile a InterpolatedXStringNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:477 + def visit_interpolated_x_string_node(node); end + + # Compile a ItLocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:482 + def visit_it_local_variable_read_node(node); end + + # Compile a ItParametersNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:487 + def visit_it_parameters_node(node); end + + # Compile a KeywordHashNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:492 + def visit_keyword_hash_node(node); end + + # Compile a KeywordRestParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:497 + def visit_keyword_rest_parameter_node(node); end + + # Compile a LambdaNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:502 + def visit_lambda_node(node); end + + # Compile a LocalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:507 + def visit_local_variable_and_write_node(node); end + + # Compile a LocalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:512 + def visit_local_variable_operator_write_node(node); end + + # Compile a LocalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:517 + def visit_local_variable_or_write_node(node); end + + # Compile a LocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:522 + def visit_local_variable_read_node(node); end + + # Compile a LocalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:527 + def visit_local_variable_target_node(node); end + + # Compile a LocalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:532 + def visit_local_variable_write_node(node); end + + # Compile a MatchLastLineNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:537 + def visit_match_last_line_node(node); end + + # Compile a MatchPredicateNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:542 + def visit_match_predicate_node(node); end + + # Compile a MatchRequiredNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:547 + def visit_match_required_node(node); end + + # Compile a MatchWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:552 + def visit_match_write_node(node); end + + # Compile a MissingNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:557 + def visit_missing_node(node); end + + # Compile a ModuleNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:562 + def visit_module_node(node); end + + # Compile a MultiTargetNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:567 + def visit_multi_target_node(node); end + + # Compile a MultiWriteNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:572 + def visit_multi_write_node(node); end + + # Compile a NextNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:577 + def visit_next_node(node); end + + # Compile a NilNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:582 + def visit_nil_node(node); end + + # Compile a NoKeywordsParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:587 + def visit_no_keywords_parameter_node(node); end + + # Compile a NumberedParametersNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:592 + def visit_numbered_parameters_node(node); end + + # Compile a NumberedReferenceReadNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:597 + def visit_numbered_reference_read_node(node); end + + # Compile a OptionalKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:602 + def visit_optional_keyword_parameter_node(node); end + + # Compile a OptionalParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:607 + def visit_optional_parameter_node(node); end + + # Compile a OrNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:612 + def visit_or_node(node); end + + # Compile a ParametersNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:617 + def visit_parameters_node(node); end + + # Compile a ParenthesesNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:622 + def visit_parentheses_node(node); end + + # Compile a PinnedExpressionNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:627 + def visit_pinned_expression_node(node); end + + # Compile a PinnedVariableNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:632 + def visit_pinned_variable_node(node); end + + # Compile a PostExecutionNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:637 + def visit_post_execution_node(node); end + + # Compile a PreExecutionNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:642 + def visit_pre_execution_node(node); end + + # Compile a ProgramNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:647 + def visit_program_node(node); end + + # Compile a RangeNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:652 + def visit_range_node(node); end + + # Compile a RationalNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:657 + def visit_rational_node(node); end + + # Compile a RedoNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:662 + def visit_redo_node(node); end + + # Compile a RegularExpressionNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:667 + def visit_regular_expression_node(node); end + + # Compile a RequiredKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:672 + def visit_required_keyword_parameter_node(node); end + + # Compile a RequiredParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:677 + def visit_required_parameter_node(node); end + + # Compile a RescueModifierNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:682 + def visit_rescue_modifier_node(node); end + + # Compile a RescueNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:687 + def visit_rescue_node(node); end + + # Compile a RestParameterNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:692 + def visit_rest_parameter_node(node); end + + # Compile a RetryNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:697 + def visit_retry_node(node); end + + # Compile a ReturnNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:702 + def visit_return_node(node); end + + # Compile a SelfNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:707 + def visit_self_node(node); end + + # Compile a ShareableConstantNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:712 + def visit_shareable_constant_node(node); end + + # Compile a SingletonClassNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:717 + def visit_singleton_class_node(node); end + + # Compile a SourceEncodingNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:722 + def visit_source_encoding_node(node); end + + # Compile a SourceFileNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:727 + def visit_source_file_node(node); end + + # Compile a SourceLineNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:732 + def visit_source_line_node(node); end + + # Compile a SplatNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:737 + def visit_splat_node(node); end + + # Compile a StatementsNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:742 + def visit_statements_node(node); end + + # Compile a StringNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:747 + def visit_string_node(node); end + + # Compile a SuperNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:752 + def visit_super_node(node); end + + # Compile a SymbolNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:757 + def visit_symbol_node(node); end + + # Compile a TrueNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:762 + def visit_true_node(node); end + + # Compile a UndefNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:767 + def visit_undef_node(node); end + + # Compile a UnlessNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:772 + def visit_unless_node(node); end + + # Compile a UntilNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:777 + def visit_until_node(node); end + + # Compile a WhenNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:782 + def visit_when_node(node); end + + # Compile a WhileNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:787 + def visit_while_node(node); end + + # Compile a XStringNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:792 + def visit_x_string_node(node); end + + # Compile a YieldNode node + # + # pkg:gem/prism#lib/prism/compiler.rb:797 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:4927 +class Prism::ConstantAndWriteNode < ::Prism::Node + # Initialize a new ConstantAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:4929 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:4941 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:4963 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:4958 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:4968 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:4973 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:4976 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:183 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4951 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5018 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:4981 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4984 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5013 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:4997 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:4992 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5005 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5023 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5010 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5028 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5047 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5049 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5153 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5062 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:5134 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5118 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5067 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5079 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5089 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:5097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:195 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5072 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5137 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:5102 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5105 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:374 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:381 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5126 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5113 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5142 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5131 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5147 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5167 +class Prism::ConstantOrWriteNode < ::Prism::Node + # Initialize a new ConstantOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5169 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5274 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5181 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5186 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5203 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5198 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5208 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5213 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:5216 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:189 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5191 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5258 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:5221 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5224 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5253 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5237 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5232 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5245 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5263 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5250 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5268 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5287 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # Initialize a new ConstantPathAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5289 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5381 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5300 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5323 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5318 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5328 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5333 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:5336 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5310 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5365 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5360 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5344 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5352 + def save_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # pkg:gem/prism#lib/prism/node.rb:5341 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5370 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5357 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5375 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5393 +class Prism::ConstantPathNode < ::Prism::Node + # Initialize a new ConstantPathNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5523 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5407 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # pkg:gem/prism#lib/prism/node_ext.rb:205 + def child; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5431 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5424 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode + # + # pkg:gem/prism#lib/prism/node.rb:5436 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parent: self.parent, name: self.name, delimiter_loc: self.delimiter_loc, name_loc: self.name_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:5444 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5502 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:5470 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5417 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # pkg:gem/prism#lib/prism/node_ext.rb:198 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # pkg:gem/prism#lib/prism/node_ext.rb:176 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5507 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # pkg:gem/prism#lib/prism/node.rb:5461 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:5489 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:5458 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Save the delimiter_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5478 + def save_delimiter_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5497 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5512 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5517 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# pkg:gem/prism#lib/prism/node_ext.rb:167 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# An error class raised when missing nodes are found while computing a +# constant path's full name. For example: +# Foo:: -> raises because the constant path is missing the last part +# +# pkg:gem/prism#lib/prism/node_ext.rb:172 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5536 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantPathOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5538 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5629 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5550 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:5610 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5594 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5555 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5568 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5578 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5583 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:5586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5560 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5613 + sig { override.returns(String) } + def inspect; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:390 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:397 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5602 + def save_binary_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # pkg:gem/prism#lib/prism/node.rb:5591 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5618 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5607 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5623 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5642 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # Initialize a new ConstantPathOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5644 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5736 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5655 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5660 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5678 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5673 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5683 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5688 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:5691 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5665 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5720 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5715 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5699 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5707 + def save_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # pkg:gem/prism#lib/prism/node.rb:5696 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5725 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:5712 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5730 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5748 +class Prism::ConstantPathTargetNode < ::Prism::Node + # Initialize a new ConstantPathTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5750 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5762 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # pkg:gem/prism#lib/prism/node_ext.rb:246 + def child; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5767 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5786 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5779 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:5791 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parent: self.parent, name: self.name, delimiter_loc: self.delimiter_loc, name_loc: self.name_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:5799 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5836 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5810 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5772 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # pkg:gem/prism#lib/prism/node_ext.rb:239 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # pkg:gem/prism#lib/prism/node_ext.rb:219 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5841 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # pkg:gem/prism#lib/prism/node.rb:5807 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:5823 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:5804 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Save the delimiter_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5818 + def save_delimiter_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5831 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5851 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5876 +class Prism::ConstantPathWriteNode < ::Prism::Node + # Initialize a new ConstantPathWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5878 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:5982 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:5889 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:5912 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:5907 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:5917 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:5922 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:5925 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5899 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:5966 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:5961 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:5942 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:5950 + def save_operator_loc(repository); end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:5936 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:5971 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:5958 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:5976 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:5994 +class Prism::ConstantReadNode < ::Prism::Node + # Initialize a new ConstantReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:5996 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6067 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6005 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6010 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6026 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6021 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode + # + # pkg:gem/prism#lib/prism/node.rb:6031 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6036 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:6039 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6015 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # pkg:gem/prism#lib/prism/node_ext.rb:142 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # pkg:gem/prism#lib/prism/node_ext.rb:137 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6051 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # pkg:gem/prism#lib/prism/node.rb:6048 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6056 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6061 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6077 +class Prism::ConstantTargetNode < ::Prism::Node + # Initialize a new ConstantTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6079 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6146 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6109 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6104 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:6114 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:6122 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6098 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # pkg:gem/prism#lib/prism/node_ext.rb:265 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # pkg:gem/prism#lib/prism/node_ext.rb:260 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6130 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:6127 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6135 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6140 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6156 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6158 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6279 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6170 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6175 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6192 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6187 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:6197 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6202 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:6205 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6180 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # pkg:gem/prism#lib/prism/node_ext.rb:155 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # pkg:gem/prism#lib/prism/node_ext.rb:150 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6263 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # pkg:gem/prism#lib/prism/node.rb:6214 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:6220 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6258 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:6245 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6228 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6253 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6268 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:6239 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6273 + def type; end + end +end + +# Raised when requested to parse as the currently running Ruby version but Prism has no support for it. +# +# pkg:gem/prism#lib/prism.rb:39 +class Prism::CurrentVersionError < ::ArgumentError + # Initialize a new exception for the given ruby version string. + # + # pkg:gem/prism#lib/prism.rb:41 + def initialize(version); end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.for("[1]") +# +# Prism::ArrayNode.new( +# source, +# 0, +# Prism::Location.new(source, 0, 3), +# 0, +# [ +# Prism::IntegerNode.new( +# source, +# 0, +# Prism::Location.new(source, 1, 1), +# Prism::IntegerBaseFlags::DECIMAL, +# 1 +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# class Builder +# include Prism::DSL +# +# attr_reader :default_source +# +# def initialize +# @default_source = source("[1]") +# end +# +# def build +# array_node( +# location: location(start_offset: 0, length: 3), +# elements: [ +# integer_node( +# location: location(start_offset: 1, length: 1), +# flags: integer_base_flag(:decimal), +# value: 1 +# ) +# ], +# opening_loc: location(start_offset: 0, length: 1), +# closing_loc: location(start_offset: 2, length: 1) +# ) +# end +# end +# +# This is mostly helpful in the context of generating trees programmatically. +# +# pkg:gem/prism#lib/prism/dsl.rb:64 +module Prism::DSL + extend ::Prism::DSL + + # Create a new AliasGlobalVariableNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:80 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def alias_global_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, new_name: global_variable_read_node(source: source), old_name: global_variable_read_node(source: source), keyword_loc: location); end + + # Create a new AliasMethodNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:85 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def alias_method_node(source: default_source, node_id: 0, location: default_location, flags: 0, new_name: symbol_node(source: source), old_name: symbol_node(source: source), keyword_loc: location); end + + # Create a new AlternationPatternNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:90 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def alternation_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end + + # Create a new AndNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:95 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def and_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end + + # Create a new ArgumentsNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:100 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def arguments_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: []); end + + # Retrieve the value of one of the ArgumentsNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:835 + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end + + # Create a new ArrayNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:105 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def array_node(source: default_source, node_id: 0, location: default_location, flags: 0, elements: [], opening_loc: nil, closing_loc: nil); end + + # Retrieve the value of one of the ArrayNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:847 + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end + + # Create a new ArrayPatternNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:110 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def array_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, requireds: [], rest: nil, posts: [], opening_loc: nil, closing_loc: nil); end + + # Create a new AssocNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:115 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def assoc_node(source: default_source, node_id: 0, location: default_location, flags: 0, key: default_node(source, location), value: default_node(source, location), operator_loc: nil); end + + # Create a new AssocSplatNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:120 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def assoc_splat_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: nil, operator_loc: location); end + + # Create a new BackReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:125 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def back_reference_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new BeginNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:130 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def begin_node(source: default_source, node_id: 0, location: default_location, flags: 0, begin_keyword_loc: nil, statements: nil, rescue_clause: nil, else_clause: nil, ensure_clause: nil, end_keyword_loc: nil); end + + # Create a new BlockArgumentNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:135 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def block_argument_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: nil, operator_loc: location); end + + # Create a new BlockLocalVariableNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:140 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def block_local_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new BlockNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:145 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def block_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], parameters: nil, body: nil, opening_loc: location, closing_loc: location); end + + # Create a new BlockParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:150 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def block_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end + + # Create a new BlockParametersNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:155 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def block_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, parameters: nil, locals: [], opening_loc: nil, closing_loc: nil); end + + # Create a new BreakNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:160 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def break_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: nil, keyword_loc: location); end + + # Create a new CallAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:165 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def call_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", operator_loc: location, value: default_node(source, location)); end + + # Create a new CallNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:170 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def call_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, name: :"", message_loc: nil, opening_loc: nil, arguments: nil, closing_loc: nil, equal_loc: nil, block: nil); end + + # Retrieve the value of one of the CallNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:855 + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + # Create a new CallOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:175 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def call_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", binary_operator: :"", binary_operator_loc: location, value: default_node(source, location)); end + + # Create a new CallOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:180 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def call_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", operator_loc: location, value: default_node(source, location)); end + + # Create a new CallTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:185 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def call_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: default_node(source, location), call_operator_loc: location, name: :"", message_loc: location); end + + # Create a new CapturePatternNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:190 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def capture_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), target: local_variable_target_node(source: source), operator_loc: location); end + + # Create a new CaseMatchNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:195 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def case_match_node(source: default_source, node_id: 0, location: default_location, flags: 0, predicate: nil, conditions: [], else_clause: nil, case_keyword_loc: location, end_keyword_loc: location); end + + # Create a new CaseNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:200 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def case_node(source: default_source, node_id: 0, location: default_location, flags: 0, predicate: nil, conditions: [], else_clause: nil, case_keyword_loc: location, end_keyword_loc: location); end + + # Create a new ClassNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:205 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def class_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], class_keyword_loc: location, constant_path: constant_read_node(source: source), inheritance_operator_loc: nil, superclass: nil, body: nil, end_keyword_loc: location, name: :""); end + + # Create a new ClassVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:210 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def class_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new ClassVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:215 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def class_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end + + # Create a new ClassVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:220 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def class_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new ClassVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def class_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new ClassVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:230 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def class_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new ClassVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:235 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def class_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end + + # Create a new ConstantAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:240 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def constant_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new ConstantOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:245 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def constant_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end + + # Create a new ConstantOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:250 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def constant_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new ConstantPathAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:255 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def constant_path_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end + + # Create a new ConstantPathNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:260 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def constant_path_node(source: default_source, node_id: 0, location: default_location, flags: 0, parent: nil, name: nil, delimiter_loc: location, name_loc: location); end + + # Create a new ConstantPathOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:265 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def constant_path_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end + + # Create a new ConstantPathOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:270 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def constant_path_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end + + # Create a new ConstantPathTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def constant_path_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, parent: nil, name: nil, delimiter_loc: location, name_loc: location); end + + # Create a new ConstantPathWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:280 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def constant_path_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end + + # Create a new ConstantReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:285 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def constant_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new ConstantTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:290 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def constant_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new ConstantWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def constant_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end + + # Create a new DefNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:300 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def def_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, receiver: nil, parameters: nil, body: nil, locals: [], def_keyword_loc: location, operator_loc: nil, lparen_loc: nil, rparen_loc: nil, equal_loc: nil, end_keyword_loc: nil); end + + # Create a new DefinedNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:305 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def defined_node(source: default_source, node_id: 0, location: default_location, flags: 0, lparen_loc: nil, value: default_node(source, location), rparen_loc: nil, keyword_loc: location); end + + # Create a new ElseNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:310 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def else_node(source: default_source, node_id: 0, location: default_location, flags: 0, else_keyword_loc: location, statements: nil, end_keyword_loc: nil); end + + # Create a new EmbeddedStatementsNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:315 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def embedded_statements_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, statements: nil, closing_loc: location); end + + # Create a new EmbeddedVariableNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:320 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def embedded_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, variable: instance_variable_read_node(source: source)); end + + # Retrieve the value of one of the EncodingFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:866 + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end + + # Create a new EnsureNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:325 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def ensure_node(source: default_source, node_id: 0, location: default_location, flags: 0, ensure_keyword_loc: location, statements: nil, end_keyword_loc: location); end + + # Create a new FalseNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:330 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::FalseNode) + end + def false_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new FindPatternNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:335 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def find_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, left: splat_node(source: source), requireds: [], right: splat_node(source: source), opening_loc: nil, closing_loc: nil); end + + # Create a new FlipFlopNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:340 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def flip_flop_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: nil, right: nil, operator_loc: location); end + + # Create a new FloatNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:345 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Float + ).returns(Prism::FloatNode) + end + def float_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: 0.0); end + + # Create a new ForNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:350 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def for_node(source: default_source, node_id: 0, location: default_location, flags: 0, index: local_variable_target_node(source: source), collection: default_node(source, location), statements: nil, for_keyword_loc: location, in_keyword_loc: location, do_keyword_loc: nil, end_keyword_loc: location); end + + # Create a new ForwardingArgumentsNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:355 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingArgumentsNode) + end + def forwarding_arguments_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ForwardingParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingParameterNode) + end + def forwarding_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ForwardingSuperNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:365 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def forwarding_super_node(source: default_source, node_id: 0, location: default_location, flags: 0, block: nil); end + + # Create a new GlobalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:370 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def global_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new GlobalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:375 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def global_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end + + # Create a new GlobalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:380 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def global_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new GlobalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:385 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def global_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new GlobalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:390 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def global_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new GlobalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def global_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end + + # Create a new HashNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:400 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def hash_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, elements: [], closing_loc: location); end + + # Create a new HashPatternNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:405 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def hash_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, elements: [], rest: nil, opening_loc: nil, closing_loc: nil); end + + # Create a new IfNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:410 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def if_node(source: default_source, node_id: 0, location: default_location, flags: 0, if_keyword_loc: nil, predicate: default_node(source, location), then_keyword_loc: nil, statements: nil, subsequent: nil, end_keyword_loc: nil); end + + # Create a new ImaginaryNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:415 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def imaginary_node(source: default_source, node_id: 0, location: default_location, flags: 0, numeric: float_node(source: source)); end + + # Create a new ImplicitNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:420 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def implicit_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: local_variable_read_node(source: source)); end + + # Create a new ImplicitRestNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:425 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ImplicitRestNode) + end + def implicit_rest_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new InNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:430 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def in_node(source: default_source, node_id: 0, location: default_location, flags: 0, pattern: default_node(source, location), statements: nil, in_loc: location, then_loc: nil); end + + # Create a new IndexAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:435 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def index_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, operator_loc: location, value: default_node(source, location)); end + + # Create a new IndexOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def index_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, binary_operator: :"", binary_operator_loc: location, value: default_node(source, location)); end + + # Create a new IndexOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:445 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def index_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, operator_loc: location, value: default_node(source, location)); end + + # Create a new IndexTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:450 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def index_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: default_node(source, location), opening_loc: location, arguments: nil, closing_loc: location, block: nil); end + + # Create a new InstanceVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:455 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def instance_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new InstanceVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:460 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def instance_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end + + # Create a new InstanceVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:465 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def instance_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new InstanceVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:470 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def instance_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new InstanceVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:475 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def instance_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new InstanceVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:480 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def instance_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end + + # Retrieve the value of one of the IntegerBaseFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:875 + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end + + # Create a new IntegerNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:485 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def integer_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: 0); end + + # Create a new InterpolatedMatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:490 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def interpolated_match_last_line_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end + + # Create a new InterpolatedRegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:495 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def interpolated_regular_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end + + # Create a new InterpolatedStringNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:500 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def interpolated_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, parts: [], closing_loc: nil); end + + # Retrieve the value of one of the InterpolatedStringNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:886 + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end + + # Create a new InterpolatedSymbolNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:505 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def interpolated_symbol_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, parts: [], closing_loc: nil); end + + # Create a new InterpolatedXStringNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:510 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def interpolated_x_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end + + # Create a new ItLocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:515 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItLocalVariableReadNode) + end + def it_local_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ItParametersNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:520 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItParametersNode) + end + def it_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new KeywordHashNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:525 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def keyword_hash_node(source: default_source, node_id: 0, location: default_location, flags: 0, elements: []); end + + # Retrieve the value of one of the KeywordHashNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:895 + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end + + # Create a new KeywordRestParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def keyword_rest_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end + + # Create a new LambdaNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:535 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def lambda_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], operator_loc: location, opening_loc: location, closing_loc: location, parameters: nil, body: nil); end + + # Create a new LocalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:540 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def local_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, operator_loc: location, value: default_node(source, location), name: :"", depth: 0); end + + # Create a new LocalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:545 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def local_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, binary_operator_loc: location, value: default_node(source, location), name: :"", binary_operator: :"", depth: 0); end + + # Create a new LocalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:550 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def local_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, operator_loc: location, value: default_node(source, location), name: :"", depth: 0); end + + # Create a new LocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:555 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def local_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0); end + + # Create a new LocalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:560 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def local_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0); end + + # Create a new LocalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:565 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def local_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0, name_loc: location, value: default_node(source, location), operator_loc: location); end + + # Create a new Location object. + # + # pkg:gem/prism#lib/prism/dsl.rb:75 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def location(source: default_source, start_offset: 0, length: 0); end + + # Retrieve the value of one of the LoopFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:903 + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end + + # Create a new MatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:570 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def match_last_line_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end + + # Create a new MatchPredicateNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:575 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def match_predicate_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), pattern: default_node(source, location), operator_loc: location); end + + # Create a new MatchRequiredNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:580 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def match_required_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), pattern: default_node(source, location), operator_loc: location); end + + # Create a new MatchWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:585 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def match_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, call: call_node(source: source), targets: []); end + + # Create a new MissingNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:590 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::MissingNode) + end + def missing_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ModuleNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:595 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def module_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], module_keyword_loc: location, constant_path: constant_read_node(source: source), body: nil, end_keyword_loc: location, name: :""); end + + # Create a new MultiTargetNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:600 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def multi_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, lefts: [], rest: nil, rights: [], lparen_loc: nil, rparen_loc: nil); end + + # Create a new MultiWriteNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:605 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def multi_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, lefts: [], rest: nil, rights: [], lparen_loc: nil, rparen_loc: nil, operator_loc: location, value: default_node(source, location)); end + + # Create a new NextNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:610 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def next_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: nil, keyword_loc: location); end + + # Create a new NilNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:615 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::NilNode) + end + def nil_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new NoKeywordsParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:620 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def no_keywords_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, keyword_loc: location); end + + # Create a new NumberedParametersNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:625 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def numbered_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, maximum: 0); end + + # Create a new NumberedReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:630 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def numbered_reference_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, number: 0); end + + # Create a new OptionalKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:635 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def optional_keyword_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location)); end + + # Create a new OptionalParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:640 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def optional_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end + + # Create a new OrNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:645 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def or_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end + + # Retrieve the value of one of the ParameterFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:911 + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end + + # Create a new ParametersNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:650 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, requireds: [], optionals: [], rest: nil, posts: [], keywords: [], keyword_rest: nil, block: nil); end + + # Create a new ParenthesesNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:655 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def parentheses_node(source: default_source, node_id: 0, location: default_location, flags: 0, body: nil, opening_loc: location, closing_loc: location); end + + # Retrieve the value of one of the ParenthesesNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:919 + sig { params(name: Symbol).returns(Integer) } + def parentheses_node_flag(name); end + + # Create a new PinnedExpressionNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:660 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def pinned_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: default_node(source, location), operator_loc: location, lparen_loc: location, rparen_loc: location); end + + # Create a new PinnedVariableNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:665 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def pinned_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, variable: local_variable_read_node(source: source), operator_loc: location); end + + # Create a new PostExecutionNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:670 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def post_execution_node(source: default_source, node_id: 0, location: default_location, flags: 0, statements: nil, keyword_loc: location, opening_loc: location, closing_loc: location); end + + # Create a new PreExecutionNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def pre_execution_node(source: default_source, node_id: 0, location: default_location, flags: 0, statements: nil, keyword_loc: location, opening_loc: location, closing_loc: location); end + + # Create a new ProgramNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:680 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def program_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], statements: statements_node(source: source)); end + + # Retrieve the value of one of the RangeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:927 + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end + + # Create a new RangeNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:685 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def range_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: nil, right: nil, operator_loc: location); end + + # Create a new RationalNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:690 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def rational_node(source: default_source, node_id: 0, location: default_location, flags: 0, numerator: 0, denominator: 0); end + + # Create a new RedoNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:695 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RedoNode) + end + def redo_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Retrieve the value of one of the RegularExpressionFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:935 + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end + + # Create a new RegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:700 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def regular_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end + + # Create a new RequiredKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:705 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def required_keyword_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location); end + + # Create a new RequiredParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:710 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def required_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end + + # Create a new RescueModifierNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:715 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def rescue_modifier_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: default_node(source, location), keyword_loc: location, rescue_expression: default_node(source, location)); end + + # Create a new RescueNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:720 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def rescue_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, exceptions: [], operator_loc: nil, reference: nil, then_keyword_loc: nil, statements: nil, subsequent: nil); end + + # Create a new RestParameterNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:725 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def rest_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end + + # Create a new RetryNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:730 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RetryNode) + end + def retry_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ReturnNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:735 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def return_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, arguments: nil); end + + # Create a new SelfNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:740 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SelfNode) + end + def self_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new ShareableConstantNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:745 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def shareable_constant_node(source: default_source, node_id: 0, location: default_location, flags: 0, write: constant_write_node(source: source)); end + + # Retrieve the value of one of the ShareableConstantNodeFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:953 + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end + + # Create a new SingletonClassNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:750 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def singleton_class_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], class_keyword_loc: location, operator_loc: location, expression: default_node(source, location), body: nil, end_keyword_loc: location); end + + # Create a new Source object. + # + # pkg:gem/prism#lib/prism/dsl.rb:70 + sig { params(string: String).returns(Prism::Source) } + def source(string); end + + # Create a new SourceEncodingNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:755 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceEncodingNode) + end + def source_encoding_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new SourceFileNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:760 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def source_file_node(source: default_source, node_id: 0, location: default_location, flags: 0, filepath: ""); end + + # Create a new SourceLineNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceLineNode) + end + def source_line_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new SplatNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:770 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def splat_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, expression: nil); end + + # Create a new StatementsNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:775 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def statements_node(source: default_source, node_id: 0, location: default_location, flags: 0, body: []); end + + # Retrieve the value of one of the StringFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:963 + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end + + # Create a new StringNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:780 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, content_loc: location, closing_loc: nil, unescaped: ""); end + + # Create a new SuperNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:785 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def super_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, lparen_loc: nil, arguments: nil, rparen_loc: nil, block: nil); end + + # Retrieve the value of one of the SymbolFlags flags. + # + # pkg:gem/prism#lib/prism/dsl.rb:974 + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end + + # Create a new SymbolNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:790 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def symbol_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, value_loc: nil, closing_loc: nil, unescaped: ""); end + + # Create a new TrueNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:795 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::TrueNode) + end + def true_node(source: default_source, node_id: 0, location: default_location, flags: 0); end + + # Create a new UndefNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:800 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def undef_node(source: default_source, node_id: 0, location: default_location, flags: 0, names: [], keyword_loc: location); end + + # Create a new UnlessNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:805 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def unless_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, predicate: default_node(source, location), then_keyword_loc: nil, statements: nil, else_clause: nil, end_keyword_loc: nil); end + + # Create a new UntilNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:810 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def until_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, do_keyword_loc: nil, closing_loc: nil, predicate: default_node(source, location), statements: nil); end + + # Create a new WhenNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:815 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def when_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, conditions: [], then_keyword_loc: nil, statements: nil); end + + # Create a new WhileNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:820 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def while_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, do_keyword_loc: nil, closing_loc: nil, predicate: default_node(source, location), statements: nil); end + + # Create a new XStringNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:825 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def x_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end + + # Create a new YieldNode node. + # + # pkg:gem/prism#lib/prism/dsl.rb:830 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def yield_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, lparen_loc: nil, arguments: nil, rparen_loc: nil); end + + private + + # The default location object that gets attached to nodes if no location is + # specified, which uses the given source. + # + # pkg:gem/prism#lib/prism/dsl.rb:993 + sig { returns(Prism::Location) } + def default_location; end + + # The default node that gets attached to nodes if no node is specified for a + # required node field. + # + # pkg:gem/prism#lib/prism/dsl.rb:999 + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end + + # The default source object that gets attached to nodes and locations if no + # source is specified. + # + # pkg:gem/prism#lib/prism/dsl.rb:987 + sig { returns(Prism::Source) } + def default_source; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6293 +class Prism::DefNode < ::Prism::Node + # Initialize a new DefNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6543 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6315 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:6383 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6320 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6343 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6334 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode + # + # pkg:gem/prism#lib/prism/node.rb:6348 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, receiver: self.receiver, parameters: self.parameters, body: self.body, locals: self.locals, def_keyword_loc: self.def_keyword_loc, operator_loc: self.operator_loc, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc, equal_loc: self.equal_loc, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6353 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:6356 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6497 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6389 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6325 + def each_child_node; end + + # def end_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6522 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6478 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6517 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6459 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6527 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:6386 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6507 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6421 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:6361 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6364 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6502 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6402 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # pkg:gem/prism#lib/prism/node.rb:6380 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:6377 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6512 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6440 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the def_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6397 + def save_def_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6492 + def save_end_keyword_loc(repository); end + + # Save the equal_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6473 + def save_equal_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6435 + def save_lparen_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6372 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6416 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6454 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6532 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6537 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6565 +class Prism::DefinedNode < ::Prism::Node + # Initialize a new DefinedNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6567 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6704 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6579 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6601 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6596 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode + # + # pkg:gem/prism#lib/prism/node.rb:6606 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lparen_loc: self.lparen_loc, value: self.value, rparen_loc: self.rparen_loc, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:6614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6589 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6688 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6683 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6660 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6673 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6619 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6678 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6641 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6668 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6633 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6655 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6693 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:6638 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6698 + def type; end + end +end + +# pkg:gem/prism#lib/prism/desugar_compiler.rb:5 +class Prism::DesugarAndWriteNode + include ::Prism::DSL + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:10 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:19 + def compile; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 + def default_source; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 + def node; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 + def read_class; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# pkg:gem/prism#lib/prism/desugar_compiler.rb:256 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:262 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:280 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:271 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:289 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:307 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:298 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:316 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:334 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:325 + def visit_global_variable_or_write_node(node); end + + # @foo &&= bar + # + # becomes + # + # @foo && @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:343 + def visit_instance_variable_and_write_node(node); end + + # @foo += bar + # + # becomes + # + # @foo = @foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:361 + def visit_instance_variable_operator_write_node(node); end + + # @foo ||= bar + # + # becomes + # + # @foo || @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:352 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:370 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:388 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:379 + def visit_local_variable_or_write_node(node); end +end + +# pkg:gem/prism#lib/prism/desugar_compiler.rb:87 +class Prism::DesugarOperatorWriteNode + include ::Prism::DSL + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:92 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:101 + def compile; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 + def default_source; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 + def node; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 + def read_class; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 + def write_class; end +end + +# pkg:gem/prism#lib/prism/desugar_compiler.rb:36 +class Prism::DesugarOrWriteDefinedNode + include ::Prism::DSL + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:41 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:50 + def compile; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 + def default_source; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 + def node; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 + def read_class; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 + def write_class; end +end + +# pkg:gem/prism#lib/prism/desugar_compiler.rb:131 +class Prism::DesugarOrWriteNode + include ::Prism::DSL + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:136 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:145 + def compile; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 + def default_source; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 + def node; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 + def read_class; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# listener = OctalListener.new +# dispatcher = Prism::Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# pkg:gem/prism#lib/prism/dispatcher.rb:45 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:50 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # pkg:gem/prism#lib/prism/dispatcher.rb:77 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # pkg:gem/prism#lib/prism/dispatcher.rb:82 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # pkg:gem/prism#lib/prism/dispatcher.rb:47 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # pkg:gem/prism#lib/prism/dispatcher.rb:57 + def register(listener, *events); end + + # Register all public methods of a listener that match the pattern + # `on__(enter|leave)`. + # + # def register_public_methods: (Listener) -> void + # + # pkg:gem/prism#lib/prism/dispatcher.rb:65 + def register_public_methods(listener); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:88 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:96 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:104 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:112 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:120 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:128 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:136 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:144 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:152 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:160 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:168 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:176 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:184 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:192 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:200 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:208 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:216 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:224 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:232 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:240 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:248 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:256 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:264 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:272 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:280 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:288 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:296 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:304 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:312 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:320 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:328 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:336 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:344 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:352 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:360 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:368 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:376 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:384 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:392 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:400 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:408 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:416 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:424 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:432 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:440 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:448 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:456 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:464 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:472 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:480 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:488 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:496 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:504 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:512 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:520 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:528 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:536 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:544 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:552 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:560 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:568 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:576 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:584 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:592 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:600 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:608 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:616 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:624 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:632 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:640 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:648 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:656 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:664 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:672 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:680 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:688 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:696 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:704 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:712 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:720 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:728 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:736 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:744 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:752 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:760 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:768 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:776 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:784 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:792 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:800 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:808 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:816 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:824 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:832 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:840 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:848 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:856 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:864 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:872 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:880 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:888 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:896 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:904 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:912 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:920 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:928 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:936 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:944 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:952 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:960 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:968 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:976 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:984 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:992 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1000 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1008 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1016 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1024 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1032 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1040 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1048 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1056 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1064 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1072 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1080 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1088 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1096 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1104 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1112 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1120 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1128 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1136 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1144 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1152 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1160 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1168 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1176 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1184 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1192 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1200 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1208 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1216 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1224 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1232 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1240 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1248 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1256 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1264 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1272 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1280 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1288 + def visit_yield_node(node); end + + private + + # Register a listener for the given events. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:70 + def register_events(listener, events); end +end + +# pkg:gem/prism#lib/prism/dispatcher.rb:1294 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # pkg:gem/prism#lib/prism/dispatcher.rb:1297 + def initialize(listeners); end + + # pkg:gem/prism#lib/prism/dispatcher.rb:1295 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1302 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1308 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1314 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1320 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1326 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1332 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1338 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1344 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1350 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1356 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1362 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1368 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1374 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1380 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1386 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1392 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1398 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1404 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1410 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1416 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1422 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1428 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1434 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1440 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1446 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1452 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1458 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1464 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1470 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1476 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1482 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1488 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1494 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1500 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1506 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1512 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1518 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1524 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1530 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1536 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1542 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1548 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1554 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1560 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1566 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1572 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1578 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1584 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1590 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1596 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1602 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1608 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1614 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1620 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1626 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1632 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1638 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1644 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1650 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1656 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1662 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1668 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1674 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1680 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1686 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1692 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1698 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1704 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1710 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1716 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1722 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1728 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1734 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1740 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1746 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1752 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1758 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1764 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1770 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1776 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1782 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1788 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1794 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1800 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1806 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1812 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1818 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1824 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1830 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1836 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1842 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1848 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1854 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1860 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1866 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1872 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1878 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1884 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1890 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1896 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1902 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1908 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1914 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1920 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1926 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1932 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1938 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1944 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1950 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1956 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1962 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1968 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1974 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1980 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1986 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1992 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:1998 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2004 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2010 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2016 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2022 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2028 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2034 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2040 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2046 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2052 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2058 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2064 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2070 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2076 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2082 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2088 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2094 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2100 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2106 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2112 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2118 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2124 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2130 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2136 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2142 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2148 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2154 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2160 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2166 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2172 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2178 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2184 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2190 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2196 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:2202 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# pkg:gem/prism#lib/prism/dot_visitor.rb:18 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:110 + def initialize; end + + # The digraph that is being built. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:107 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:115 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:120 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:145 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:170 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:195 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:220 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:250 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:290 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:352 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:379 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:402 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:419 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:467 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:490 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:510 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:545 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:573 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:616 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:639 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:685 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:748 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:797 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:843 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:873 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:898 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:943 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:988 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1035 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1062 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1092 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1119 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1136 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1153 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1180 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1207 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1237 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1264 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1289 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1318 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1346 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1371 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1400 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1425 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1442 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1459 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1486 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1555 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1586 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1614 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1640 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1661 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1687 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1701 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1752 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1784 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1801 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1843 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1857 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1871 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1891 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1918 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1948 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1975 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:1992 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2009 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2036 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2069 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2118 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2163 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2181 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2199 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2213 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2245 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2298 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2354 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2407 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2446 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2473 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2503 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2530 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2547 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2564 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2591 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2611 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2647 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2683 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2723 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2760 + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2793 + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2807 + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2821 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2851 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2879 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2917 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2947 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:2980 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3010 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3030 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3050 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3080 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3109 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3134 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3159 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3190 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3204 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3240 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3296 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3359 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3382 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3396 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3416 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3433 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3450 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3477 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3507 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3532 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3616 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3645 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3672 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3693 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3722 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3751 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3772 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3804 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3827 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3841 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3870 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3893 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3913 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3938 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:3996 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4024 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4038 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4061 + def visit_self_node(node); end + + # Visit a ShareableConstantNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4075 + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4096 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4132 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4146 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4166 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4180 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4203 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4230 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4263 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4302 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4337 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4351 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4381 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4424 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4464 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4505 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4545 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4574 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4620 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4632 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4640 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4651 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4660 + def integer_base_flags_inspect(node); end + + # Inspect a node that has interpolated_string_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4671 + def interpolated_string_node_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4680 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4614 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4688 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4609 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4696 + def parameter_flags_inspect(node); end + + # Inspect a node that has parentheses_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4704 + def parentheses_node_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4712 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4720 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4738 + def shareable_constant_node_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4748 + def string_flags_inspect(node); end + + # Inspect a node that has symbol_flags flags to display the flags as a + # comma-separated list. + # + # pkg:gem/prism#lib/prism/dot_visitor.rb:4759 + def symbol_flags_inspect(node); end +end + +# pkg:gem/prism#lib/prism/dot_visitor.rb:63 +class Prism::DotVisitor::Digraph + # pkg:gem/prism#lib/prism/dot_visitor.rb:66 + def initialize; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:80 + def edge(value); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 + def edges; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:72 + def node(value); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 + def nodes; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:84 + def to_dot; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:76 + def waypoint(value); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 + def waypoints; end +end + +# pkg:gem/prism#lib/prism/dot_visitor.rb:19 +class Prism::DotVisitor::Field + # pkg:gem/prism#lib/prism/dot_visitor.rb:22 + def initialize(name, value, port); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 + def name; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 + def port; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:28 + def to_dot; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 + def value; end +end + +# pkg:gem/prism#lib/prism/dot_visitor.rb:37 +class Prism::DotVisitor::Table + # pkg:gem/prism#lib/prism/dot_visitor.rb:40 + def initialize(name); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:45 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 + def fields; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 + def name; end + + # pkg:gem/prism#lib/prism/dot_visitor.rb:49 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6717 +class Prism::ElseNode < ::Prism::Node + # Initialize a new ElseNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6719 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6833 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6730 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6735 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6754 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6747 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode + # + # pkg:gem/prism#lib/prism/node.rb:6759 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, else_keyword_loc: self.else_keyword_loc, statements: self.statements, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6764 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:6767 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6740 + def each_child_node; end + + # def else_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6807 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6772 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:6812 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:6788 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6817 + sig { override.returns(String) } + def inspect; end + + # Save the else_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6780 + def save_else_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6802 + def save_end_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:6785 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6822 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6827 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# pkg:gem/prism#lib/prism/parse_result.rb:558 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:565 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # pkg:gem/prism#lib/prism/parse_result.rb:560 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6845 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # Initialize a new EmbeddedStatementsNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6847 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:6955 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6858 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6863 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6934 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6916 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:6882 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6875 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode + # + # pkg:gem/prism#lib/prism/node.rb:6887 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, statements: self.statements, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6892 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:6895 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6868 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:6939 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:6929 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:6900 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6924 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:6908 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:6913 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:6944 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:6949 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:6967 +class Prism::EmbeddedVariableNode < ::Prism::Node + # Initialize a new EmbeddedVariableNode node. + # + # pkg:gem/prism#lib/prism/node.rb:6969 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, variable); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7056 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:6979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:6984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:6996 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode + # + # pkg:gem/prism#lib/prism/node.rb:7006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, variable: self.variable); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7011 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } + # + # pkg:gem/prism#lib/prism/node.rb:7014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6989 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7040 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7035 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:7019 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7027 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7045 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode + # + # pkg:gem/prism#lib/prism/node.rb:7032 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7050 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# pkg:gem/prism#lib/prism/node.rb:19819 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# pkg:gem/prism#lib/prism/node.rb:19824 +Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# pkg:gem/prism#lib/prism/node.rb:19821 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# pkg:gem/prism#lib/prism/node.rb:7071 +class Prism::EnsureNode < ::Prism::Node + # Initialize a new EnsureNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7073 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7181 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7108 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7101 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode + # + # pkg:gem/prism#lib/prism/node.rb:7113 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, ensure_keyword_loc: self.ensure_keyword_loc, statements: self.statements, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7121 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7094 + def each_child_node; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7160 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:7142 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7155 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:7126 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7165 + sig { override.returns(String) } + def inspect; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7150 + def save_end_keyword_loc(repository); end + + # Save the ensure_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7134 + def save_ensure_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:7139 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7170 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7175 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7193 +class Prism::FalseNode < ::Prism::Node + # Initialize a new FalseNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7195 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7258 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7203 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7224 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7219 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode + # + # pkg:gem/prism#lib/prism/node.rb:7229 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7234 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7237 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7213 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7242 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7247 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7252 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# foo => *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7276 +class Prism::FindPatternNode < ::Prism::Node + # Initialize a new FindPatternNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7278 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7449 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7292 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:7428 + sig { returns(T.nilable(String)) } + def closing; end + + # The location of the closing brace. + # + # foo in [*bar, baz, *qux] + # ^ + # + # foo in Foo(*bar, baz, *qux) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:7404 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7322 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7312 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the pattern + # + # foo in Foo(*bar, baz, *qux) + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7343 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # + # pkg:gem/prism#lib/prism/node.rb:7327 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, left: self.left, requireds: self.requireds, right: self.right, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:7335 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7302 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7433 + sig { override.returns(String) } + def inspect; end + + # Represents the first wildcard node in the pattern. + # + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7352 + sig { returns(Prism::SplatNode) } + def left; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:7423 + sig { returns(T.nilable(String)) } + def opening; end + + # The location of the opening brace. + # + # foo in [*bar, baz, *qux] + # ^ + # + # foo in Foo(*bar, baz, *qux) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:7379 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the nodes in between the wildcards. + # + # foo in *bar, baz, *qux + # ^^^ + # + # foo in Foo(*bar, baz, 1, *qux) + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7361 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # Represents the second wildcard node in the pattern. + # + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7370 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } + def right; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7418 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7393 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7438 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7443 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7465 +class Prism::FlipFlopNode < ::Prism::Node + # Initialize a new FlipFlopNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7467 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7567 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7478 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7483 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7504 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7496 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode + # + # pkg:gem/prism#lib/prism/node.rb:7509 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7514 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7517 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7488 + def each_child_node; end + + # def exclude_end?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:7522 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7551 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:7527 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7546 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:7533 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:7530 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7541 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7556 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7561 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7580 +class Prism::FloatNode < ::Prism::Node + # Initialize a new FloatNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7582 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7649 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7591 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7596 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7607 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode + # + # pkg:gem/prism#lib/prism/node.rb:7617 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7622 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } + # + # pkg:gem/prism#lib/prism/node.rb:7625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7601 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7633 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7638 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # pkg:gem/prism#lib/prism/node.rb:7630 + sig { returns(Float) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7643 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7659 +class Prism::ForNode < ::Prism::Node + # Initialize a new ForNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7661 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7848 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7676 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7681 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # The collection to iterate over. + # + # for i in a end + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:7731 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7704 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7695 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode + # + # pkg:gem/prism#lib/prism/node.rb:7709 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, index: self.index, collection: self.collection, statements: self.statements, for_keyword_loc: self.for_keyword_loc, in_keyword_loc: self.in_keyword_loc, do_keyword_loc: self.do_keyword_loc, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7717 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:7822 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:7777 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7686 + def each_child_node; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7827 + sig { returns(String) } + def end_keyword; end + + # The location of the `end` keyword. + # + # for i in a end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7799 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7812 + sig { returns(String) } + def for_keyword; end + + # The location of the `for` keyword. + # + # for i in a end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7745 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:7817 + sig { returns(String) } + def in_keyword; end + + # The location of the `in` keyword. + # + # for i in a end + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:7761 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # The index expression for `for` loops. + # + # for i in a end + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:7725 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end + def index; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7832 + sig { override.returns(String) } + def inspect; end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7791 + def save_do_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7807 + def save_end_keyword_loc(repository); end + + # Save the for_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7753 + def save_for_keyword_loc(repository); end + + # Save the in_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:7769 + def save_in_keyword_loc(repository); end + + # Represents the body of statements to execute for each iteration of the loop. + # + # for i in a + # foo(i) + # ^^^^^^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:7739 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7837 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7842 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:7866 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # Initialize a new ForwardingArgumentsNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7868 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:7931 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7876 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7881 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7897 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7892 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode + # + # pkg:gem/prism#lib/prism/node.rb:7902 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7907 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7910 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7886 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7915 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7920 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:7925 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:7941 +class Prism::ForwardingParameterNode < ::Prism::Node + # Initialize a new ForwardingParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:7943 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8006 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:7951 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7956 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:7972 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:7967 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:7977 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:7982 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:7985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7961 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:7990 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:7995 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8000 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments, but which might have a block. +# +# super +# ^^^^^ +# +# super { 123 } +# ^^^^^^^^^^^^^ +# +# If it has any other arguments, it would be a `SuperNode` instead. +# +# pkg:gem/prism#lib/prism/node.rb:8020 +class Prism::ForwardingSuperNode < ::Prism::Node + # Initialize a new ForwardingSuperNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8022 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8092 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8031 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # All other arguments are forwarded as normal, except the original block is replaced with the new block. + # + # pkg:gem/prism#lib/prism/node.rb:8073 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8036 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8055 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8048 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode + # + # pkg:gem/prism#lib/prism/node.rb:8060 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, block: self.block); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8065 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } + # + # pkg:gem/prism#lib/prism/node.rb:8068 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8041 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8076 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8081 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8086 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8102 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # Initialize a new GlobalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8104 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8209 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8116 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8121 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8138 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8133 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:8143 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8148 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:8151 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:201 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8126 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8193 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:8156 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8159 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:8188 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8172 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8167 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8180 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8198 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:8185 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8203 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8222 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8224 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8328 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8237 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:8309 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8293 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8242 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8254 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:8264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8269 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:8272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:213 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8247 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8312 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:8277 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8280 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:406 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:413 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8301 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8288 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8317 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:8306 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8322 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8342 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8344 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8449 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8356 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8378 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8373 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:8383 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8388 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:8391 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:207 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8366 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8433 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:8396 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8399 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:8428 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:8412 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8407 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8420 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8438 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:8425 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8443 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8462 +class Prism::GlobalVariableReadNode < ::Prism::Node + # Initialize a new GlobalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8464 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8535 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8473 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8478 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8494 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8489 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode + # + # pkg:gem/prism#lib/prism/node.rb:8499 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:8507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8483 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8519 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # pkg:gem/prism#lib/prism/node.rb:8516 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8524 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8529 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8545 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # Initialize a new GlobalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8547 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8614 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8556 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8561 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8577 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8572 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:8582 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8587 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:8590 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8566 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8598 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:8595 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8603 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8608 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8624 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # Initialize a new GlobalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8626 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8747 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8638 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8660 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8655 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:8665 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8670 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:8673 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8648 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8731 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # pkg:gem/prism#lib/prism/node.rb:8682 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8688 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:8726 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:8713 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8696 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8721 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8736 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8707 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8741 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8760 +class Prism::HashNode < ::Prism::Node + # Initialize a new HashNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:8880 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8773 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8778 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:8859 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:8841 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8795 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8790 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode + # + # pkg:gem/prism#lib/prism/node.rb:8800 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, elements: self.elements, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:8808 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8783 + def each_child_node; end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8835 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:8864 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:8854 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:8816 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8849 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:8824 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:8869 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:8874 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# foo => Bar[a: 1, b: 2] +# ^^^^^^^^^^^^^^^ +# +# foo in { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8902 +class Prism::HashPatternNode < ::Prism::Node + # Initialize a new HashPatternNode node. + # + # pkg:gem/prism#lib/prism/node.rb:8904 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9066 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:8917 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8922 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9045 + sig { returns(T.nilable(String)) } + def closing; end + + # The location of the closing brace. + # + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:9021 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:8945 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:8936 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the Hash. + # + # foo => Bar[a: 1, b: 2] + # ^^^ + # + # foo => Bar::Baz[a: 1, b: 2] + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8969 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # + # pkg:gem/prism#lib/prism/node.rb:8950 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, elements: self.elements, rest: self.rest, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:8955 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:8958 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8927 + def each_child_node; end + + # Represents the explicit named hash keys and values. + # + # foo => { a: 1, b:, ** } + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8975 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9050 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9040 + sig { returns(T.nilable(String)) } + def opening; end + + # The location of the opening brace. + # + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:8996 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`. + # + # foo => { a: 1, b:, **c } + # ^^^ + # + # foo => { a: 1, b:, ** } + # ^^ + # + # foo => { a: 1, b:, **nil } + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8987 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9035 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9010 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9055 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9060 + def type; end + end +end + +# pkg:gem/prism#lib/prism/node_ext.rb:55 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # pkg:gem/prism#lib/prism/node_ext.rb:57 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9087 +class Prism::IfNode < ::Prism::Node + # Initialize a new IfNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9089 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9292 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9103 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9108 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9131 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9122 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent if/elsif/else clause of the if node. This method is + # deprecated in favor of #subsequent. + # + # pkg:gem/prism#lib/prism/node_ext.rb:488 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode + # + # pkg:gem/prism#lib/prism/node.rb:9136 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, if_keyword_loc: self.if_keyword_loc, predicate: self.predicate, then_keyword_loc: self.then_keyword_loc, statements: self.statements, subsequent: self.subsequent, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:9144 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9113 + def each_child_node; end + + # def end_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9271 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:9242 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9261 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # pkg:gem/prism#lib/prism/node.rb:9154 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9276 + sig { override.returns(String) } + def inspect; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:92 + def newline_flag!(lines); end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:9184 + sig { returns(Prism::Node) } + def predicate; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9256 + def save_end_keyword_loc(repository); end + + # Save the if_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9168 + def save_if_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9207 + def save_then_keyword_loc(repository); end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # pkg:gem/prism#lib/prism/node.rb:9219 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:9234 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + + # def then_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9266 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:9193 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9281 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9286 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9307 +class Prism::ImaginaryNode < ::Prism::Node + # Initialize a new ImaginaryNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9309 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end + def initialize(source, node_id, location, flags, numeric); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9377 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9318 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9323 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9340 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9335 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode + # + # pkg:gem/prism#lib/prism/node.rb:9345 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, numeric: self.numeric); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9350 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } + # + # pkg:gem/prism#lib/prism/node.rb:9353 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9328 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9361 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # pkg:gem/prism#lib/prism/node.rb:9358 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9366 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # pkg:gem/prism#lib/prism/node_ext.rb:110 + sig { returns(Complex) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9371 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9393 +class Prism::ImplicitNode < ::Prism::Node + # Initialize a new ImplicitNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9463 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9426 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9421 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode + # + # pkg:gem/prism#lib/prism/node.rb:9431 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } + # + # pkg:gem/prism#lib/prism/node.rb:9439 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9414 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9447 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9452 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:9444 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9457 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# pkg:gem/prism#lib/prism/node.rb:9482 +class Prism::ImplicitRestNode < ::Prism::Node + # Initialize a new ImplicitRestNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9484 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9547 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9492 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9497 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9513 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9508 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode + # + # pkg:gem/prism#lib/prism/node.rb:9518 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9523 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:9526 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9502 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9531 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9536 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9541 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9556 +class Prism::InNode < ::Prism::Node + # Initialize a new InNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9558 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9678 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9570 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9575 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9596 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9588 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode + # + # pkg:gem/prism#lib/prism/node.rb:9601 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, pattern: self.pattern, statements: self.statements, in_loc: self.in_loc, then_loc: self.then_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9606 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:9609 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9580 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:9652 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:9620 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9662 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:9614 + sig { returns(Prism::Node) } + def pattern; end + + # Save the in_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9628 + def save_in_loc(repository); end + + # Save the then_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9647 + def save_then_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:9617 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9657 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:9633 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9667 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9672 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9691 +class Prism::IndexAndWriteNode < ::Prism::Node + # Initialize a new IndexAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9693 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:9883 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:9812 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9767 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # pkg:gem/prism#lib/prism/node.rb:9828 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:9847 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:9780 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:9857 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:9815 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9739 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9729 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:9744 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:9752 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9719 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9772 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:9867 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:9852 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:9799 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:9862 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:9831 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:9777 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9757 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9794 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9823 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9807 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:9839 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:9872 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:9844 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9762 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:9877 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:9901 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # Initialize a new IndexOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:9903 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10092 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:9920 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:10023 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9978 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10042 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10045 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: BlockArgumentNode? + # + # pkg:gem/prism#lib/prism/node.rb:10039 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:10061 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:9991 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9925 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10071 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10026 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:9950 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:9940 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:9955 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:9960 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:9963 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9930 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9983 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10076 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10066 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10010 + sig { returns(Prism::Location) } + def opening_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:422 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:429 + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:9988 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9968 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10053 + def save_binary_operator_loc(repository); end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10005 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10034 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10018 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10081 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10058 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:9973 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10086 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10111 +class Prism::IndexOrWriteNode < ::Prism::Node + # Initialize a new IndexOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10113 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10303 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10129 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:10232 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10187 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # pkg:gem/prism#lib/prism/node.rb:10248 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:10267 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:10200 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10134 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10277 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10235 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10159 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10149 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:10164 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10169 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:10172 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10139 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10192 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10287 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10272 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10219 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10282 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10251 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:10197 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10177 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10214 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10243 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10227 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10259 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10292 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10264 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10182 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10297 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10329 +class Prism::IndexTargetNode < ::Prism::Node + # Initialize a new IndexTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10331 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).void + end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10471 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10344 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:10426 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10400 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # pkg:gem/prism#lib/prism/node.rb:10442 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10349 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10450 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10429 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10372 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10363 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:10377 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10382 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } + # + # pkg:gem/prism#lib/prism/node.rb:10385 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10354 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10405 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10455 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10445 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10413 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10410 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10390 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10437 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10421 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10460 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:10395 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10465 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# pkg:gem/prism#lib/prism/parse_result.rb:543 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:551 + sig { returns(String) } + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # pkg:gem/prism#lib/prism/parse_result.rb:546 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# pkg:gem/prism#lib/prism/inspect_visitor.rb:15 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:38 + sig { params(indent: String).void } + def initialize(indent = ""); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:35 + def commands; end + + # Compose the final string. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:51 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:31 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:80 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:92 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:104 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:116 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:128 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:144 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:162 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:201 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:213 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:227 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:235 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:268 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:282 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:290 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:312 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:326 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:350 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:364 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:384 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:415 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:436 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:456 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:468 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:480 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:510 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:540 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:566 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:578 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:591 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:603 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:611 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:619 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:631 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:643 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:656 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:668 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:680 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:700 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:713 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:725 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:745 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:757 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:765 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:773 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:785 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:819 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:831 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:846 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:861 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:871 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:886 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:893 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:921 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:941 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:949 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:970 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:977 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:984 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:997 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1009 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1022 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1034 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1042 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1050 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1062 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1080 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1110 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1134 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1143 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1152 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1159 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1176 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1207 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1239 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1270 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1293 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1305 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1318 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1330 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1338 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1346 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1358 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1366 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1384 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1402 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1420 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1438 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItLocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1456 + def visit_it_local_variable_read_node(node); end + + # Inspect a ItParametersNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1463 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1470 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1486 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1500 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1523 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1536 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1550 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1563 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1572 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1581 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1594 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1605 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1617 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1629 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1647 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1654 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1673 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1706 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1742 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1756 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1763 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1772 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1780 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1788 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1799 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1811 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1823 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1884 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1899 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1911 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1921 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1937 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1953 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1963 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1983 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1992 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1999 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2010 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2019 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2027 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2039 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2076 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2090 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2097 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2111 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2118 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2127 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2146 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2153 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2161 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2168 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2182 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2198 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2209 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2231 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2242 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2249 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2266 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2290 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2308 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2332 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2350 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2361 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2385 + def inspect_location(location); end + + # Compose a header for the given node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2379 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # pkg:gem/prism#lib/prism/inspect_visitor.rb:44 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# pkg:gem/prism#lib/prism/inspect_visitor.rb:20 +class Prism::InspectVisitor::Replace + # pkg:gem/prism#lib/prism/inspect_visitor.rb:23 + def initialize(value); end + + # pkg:gem/prism#lib/prism/inspect_visitor.rb:21 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10486 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # Initialize a new InstanceVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10488 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10593 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10500 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10505 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10522 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10517 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:10527 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10532 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:10535 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:219 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10510 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10577 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10540 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10543 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10572 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10556 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10551 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10564 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10582 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10569 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10587 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10606 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10608 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10712 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10621 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10693 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10677 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10626 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10643 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10638 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:10648 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10653 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:10656 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:231 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10631 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10696 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10661 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10664 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:438 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:445 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10685 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10672 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10701 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10690 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10706 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10726 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10728 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10833 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10740 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10745 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10762 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10757 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:10767 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10772 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:10775 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:225 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10750 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10817 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10780 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10783 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:10812 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:10796 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10791 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:10804 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10822 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:10809 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10827 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10846 +class Prism::InstanceVariableReadNode < ::Prism::Node + # Initialize a new InstanceVariableReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10848 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10919 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10857 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10862 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10878 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10873 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode + # + # pkg:gem/prism#lib/prism/node.rb:10883 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10888 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:10891 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10867 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10903 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # pkg:gem/prism#lib/prism/node.rb:10900 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10908 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10913 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:10929 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # Initialize a new InstanceVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:10931 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:10998 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:10940 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10945 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:10961 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:10956 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:10966 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:10971 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:10974 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10950 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:10982 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:10979 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:10987 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:10992 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11008 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # Initialize a new InstanceVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11010 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11131 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11022 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11027 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11044 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11039 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:11049 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11054 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:11057 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11032 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11115 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # pkg:gem/prism#lib/prism/node.rb:11066 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:11072 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11110 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:11097 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11080 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11105 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11120 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:11091 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11125 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# pkg:gem/prism#lib/prism/node.rb:19828 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# pkg:gem/prism#lib/prism/node.rb:19830 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# pkg:gem/prism#lib/prism/node.rb:19833 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# pkg:gem/prism#lib/prism/node.rb:19839 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# pkg:gem/prism#lib/prism/node.rb:19836 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# pkg:gem/prism#lib/prism/node.rb:11144 +class Prism::IntegerNode < ::Prism::Node + # Initialize a new IntegerNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11146 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11233 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11155 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11194 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11176 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11171 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode + # + # pkg:gem/prism#lib/prism/node.rb:11181 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end + + # def decimal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11199 + sig { returns(T::Boolean) } + def decimal?; end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11186 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:11189 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11165 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11209 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11217 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11204 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11222 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # pkg:gem/prism#lib/prism/node.rb:11214 + sig { returns(Integer) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11227 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11244 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedMatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11246 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11407 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11257 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11322 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11262 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11386 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11368 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11279 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11274 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode + # + # pkg:gem/prism#lib/prism/node.rb:11284 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11289 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:11292 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11267 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11317 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11302 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11342 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11347 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11337 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11297 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11391 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11307 + sig { returns(T::Boolean) } + def multi_line?; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:122 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11312 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11381 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11352 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # pkg:gem/prism#lib/prism/node.rb:11365 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11376 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11360 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11396 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11332 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11327 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11401 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11421 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedRegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11423 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11584 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11434 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11499 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11439 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11563 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11545 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11456 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11451 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode + # + # pkg:gem/prism#lib/prism/node.rb:11461 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11466 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:11469 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11444 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11494 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11479 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11519 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11524 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11514 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11474 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11568 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11484 + sig { returns(T::Boolean) } + def multi_line?; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:129 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11489 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11558 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11529 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # pkg:gem/prism#lib/prism/node.rb:11542 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11553 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11537 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11573 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11509 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11504 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11578 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11598 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedStringNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11600 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11728 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11611 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11616 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:11707 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:11683 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11633 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11628 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode + # + # pkg:gem/prism#lib/prism/node.rb:11638 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:11646 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11621 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11651 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11712 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:11656 + sig { returns(T::Boolean) } + def mutable?; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:136 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:11702 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:11661 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode] + # + # pkg:gem/prism#lib/prism/node.rb:11680 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) + end + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11697 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11675 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11717 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11722 + def type; end + end +end + +# Flags for interpolated string nodes that indicated mutability if they are also marked as literals. +# +# pkg:gem/prism#lib/prism/node.rb:19843 +module Prism::InterpolatedStringNodeFlags; end + +# pkg:gem/prism#lib/prism/node.rb:19845 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/node.rb:19848 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11742 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # Initialize a new InterpolatedSymbolNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11744 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11862 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11755 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11760 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:11841 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:11817 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11777 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11772 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode + # + # pkg:gem/prism#lib/prism/node.rb:11782 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:11790 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11765 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11846 + sig { override.returns(String) } + def inspect; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:143 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:11836 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:11795 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # pkg:gem/prism#lib/prism/node.rb:11814 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11831 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11809 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11851 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11856 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:11875 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedXStringNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11877 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:11983 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:11888 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11962 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11944 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:11910 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:11905 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode + # + # pkg:gem/prism#lib/prism/node.rb:11915 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:11920 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:11923 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11898 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:11967 + sig { override.returns(String) } + def inspect; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:150 + def newline_flag!(lines); end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:11957 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:11928 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # pkg:gem/prism#lib/prism/node.rb:11941 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11952 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:11936 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:11972 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:11977 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# pkg:gem/prism#lib/prism/node.rb:11996 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # Initialize a new ItLocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:11998 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12061 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12006 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12011 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12027 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12022 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode + # + # pkg:gem/prism#lib/prism/node.rb:12032 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12037 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:12040 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12016 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12045 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12050 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12055 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12070 +class Prism::ItParametersNode < ::Prism::Node + # Initialize a new ItParametersNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12072 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12135 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12080 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12101 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12096 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode + # + # pkg:gem/prism#lib/prism/node.rb:12106 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12111 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:12114 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12090 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12119 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12124 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12129 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12144 +class Prism::KeywordHashNode < ::Prism::Node + # Initialize a new KeywordHashNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12146 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).void + end + def initialize(source, node_id, location, flags, elements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12219 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12155 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12177 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12172 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode + # + # pkg:gem/prism#lib/prism/node.rb:12182 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, elements: self.elements); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12187 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } + # + # pkg:gem/prism#lib/prism/node.rb:12190 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12165 + def each_child_node; end + + # attr_reader elements: Array[AssocNode | AssocSplatNode] + # + # pkg:gem/prism#lib/prism/node.rb:12200 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12203 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:12195 + sig { returns(T::Boolean) } + def symbol_keys?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12208 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12213 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19852 +module Prism::KeywordHashNodeFlags; end + +# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments +# +# pkg:gem/prism#lib/prism/node.rb:19854 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:12232 +class Prism::KeywordRestParameterNode < ::Prism::Node + # Initialize a new KeywordRestParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12234 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12345 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12245 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12266 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12261 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:12271 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12276 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:12279 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12255 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12329 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # pkg:gem/prism#lib/prism/node.rb:12289 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:12292 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12324 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12311 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:12284 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12306 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12319 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12334 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12339 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12358 +class Prism::LambdaNode < ::Prism::Node + # Initialize a new LambdaNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12497 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12374 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:12463 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12379 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12476 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12447 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12400 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12392 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode + # + # pkg:gem/prism#lib/prism/node.rb:12405 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, operator_loc: self.operator_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc, parameters: self.parameters, body: self.body); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12410 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } + # + # pkg:gem/prism#lib/prism/node.rb:12413 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12384 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12481 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:12418 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12471 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12434 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12466 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12421 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:12460 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12455 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12442 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12429 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12486 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12491 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:10 +class Prism::LexCompat + # pkg:gem/prism#lib/prism/lex_compat.rb:586 + def initialize(code, **options); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:828 + def add_on_sp_tokens(tokens, source, data_loc, bom, eof_token); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:584 + def options; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:591 + def result; end +end + +# In previous versions of Ruby, Ripper wouldn't flush the bom before the +# first token, so we had to have a hack in place to account for that. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:581 +Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), TrueClass) + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:253 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:565 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:277 +class Prism::LexCompat::Heredoc::DashHeredoc + # pkg:gem/prism#lib/prism/lex_compat.rb:280 + def initialize(split); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:285 + def <<(token); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:278 + def split; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:289 + def to_a; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:278 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:336 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # pkg:gem/prism#lib/prism/lex_compat.rb:341 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:352 + def <<(token); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:339 + def dedent; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:339 + def dedent_next; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:339 + def embexpr_balance; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:389 + def to_a; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:339 + def tokens; end +end + +# pkg:gem/prism#lib/prism/lex_compat.rb:337 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:258 +class Prism::LexCompat::Heredoc::PlainHeredoc + # pkg:gem/prism#lib/prism/lex_compat.rb:261 + def initialize; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:265 + def <<(token); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:269 + def to_a; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:259 + def tokens; end +end + +# Tokens where state should be ignored +# used for :on_sp, :on_comment, :on_heredoc_end, :on_embexpr_end +# +# pkg:gem/prism#lib/prism/lex_compat.rb:244 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # pkg:gem/prism#lib/prism/lex_compat.rb:245 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:31 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:12 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:17 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:23 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:14 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# pkg:gem/prism#lib/prism/lex_compat.rb:202 +class Prism::LexCompat::Token < ::BasicObject + # Create a new token object with the given ripper-compatible array. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:204 + def initialize(array); end + + # We want to pretend that this is just an Array. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:229 + def ==(other); end + + # The type of the token. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:214 + def event; end + + # The location of the token in the source. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:209 + def location; end + + # pkg:gem/prism#lib/prism/lex_compat.rb:237 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # The state of the lexer when this token was produced. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:224 + def state; end + + # The slice of the source that this token represents. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:219 + def value; end + + private + + # pkg:gem/prism#lib/prism/lex_compat.rb:233 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# pkg:gem/prism#lib/prism/parse_result.rb:778 +class Prism::LexResult < ::Prism::Result + # Create a new lex result object with the given values. + # + # pkg:gem/prism#lib/prism/parse_result.rb:783 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # pkg:gem/prism#lib/prism/parse_result.rb:789 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The list of tokens that were parsed from the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:780 + sig { returns(T::Array[T.untyped]) } + def value; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12513 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # Initialize a new LocalVariableAndWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12515 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12624 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12528 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12533 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12550 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12545 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:12555 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, name: self.name, depth: self.depth); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12560 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:12563 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # pkg:gem/prism#lib/prism/node.rb:12600 + sig { returns(Integer) } + def depth; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:237 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12538 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12608 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:12597 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12568 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12603 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12581 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12576 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12589 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12613 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:12594 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12618 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12638 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new LocalVariableOperatorWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12640 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12748 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12654 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:12726 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12707 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12659 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12676 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12671 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:12681 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, name: self.name, binary_operator: self.binary_operator, depth: self.depth); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12686 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:12689 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # pkg:gem/prism#lib/prism/node.rb:12729 + sig { returns(Integer) } + def depth; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:249 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12664 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12732 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:12723 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12694 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:454 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # pkg:gem/prism#lib/prism/node_ext.rb:461 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12715 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12702 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12737 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:12720 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12742 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12763 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # Initialize a new LocalVariableOrWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12874 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12800 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12795 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:12805 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, name: self.name, depth: self.depth); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:12813 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # pkg:gem/prism#lib/prism/node.rb:12850 + sig { returns(Integer) } + def depth; end + + # pkg:gem/prism#lib/prism/desugar_compiler.rb:243 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12788 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12858 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:12847 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12818 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:12853 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:12831 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12826 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:12839 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12863 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:12844 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12868 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12888 +class Prism::LocalVariableReadNode < ::Prism::Node + # Initialize a new LocalVariableReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:12975 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:12900 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12905 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:12921 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:12916 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode + # + # pkg:gem/prism#lib/prism/node.rb:12926 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:12931 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:12934 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # pkg:gem/prism#lib/prism/node.rb:12956 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12910 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:12959 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # pkg:gem/prism#lib/prism/node.rb:12947 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:12964 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:12969 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# foo => baz +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12989 +class Prism::LocalVariableTargetNode < ::Prism::Node + # Initialize a new LocalVariableTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:12991 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13062 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13001 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13006 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13022 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13017 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:13027 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13032 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:13035 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # pkg:gem/prism#lib/prism/node.rb:13043 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13011 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13046 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:13040 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13051 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13056 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13073 +class Prism::LocalVariableWriteNode < ::Prism::Node + # Initialize a new LocalVariableWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13075 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13210 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13110 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13105 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:13115 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13120 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:13123 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # pkg:gem/prism#lib/prism/node.rb:13141 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13098 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13194 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # pkg:gem/prism#lib/prism/node.rb:13132 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:13147 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13189 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:13176 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13155 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13184 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13199 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # pkg:gem/prism#lib/prism/node.rb:13170 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13204 + def type; end + end +end + +# This represents a location in the source. +# +# pkg:gem/prism#lib/prism/parse_result.rb:287 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # pkg:gem/prism#lib/prism/parse_result.rb:302 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:490 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # pkg:gem/prism#lib/prism/parse_result.rb:509 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:475 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:411 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:451 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:389 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + + # Returns a new location that is the result of chopping off the last byte. + # + # pkg:gem/prism#lib/prism/parse_result.rb:348 + sig { returns(Prism::Location) } + def chop; end + + # Returns all comments that are associated with this location (both leading + # and trailing comments). + # + # pkg:gem/prism#lib/prism/parse_result.rb:338 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # pkg:gem/prism#lib/prism/parse_result.rb:343 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def copy(source: self.source, start_offset: self.start_offset, length: self.length); end + + # Implement the hash pattern matching interface for Location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:480 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:463 + sig { returns(Integer) } + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # pkg:gem/prism#lib/prism/parse_result.rb:400 + sig { returns(Integer) } + def end_character_offset; end + + # The column number in code units of the given encoding where this location + # ends from the start of the line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:469 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_column(encoding = Encoding::UTF_16LE); end + + # The offset from the start of the file in code units of the given encoding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:405 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_offset(encoding = Encoding::UTF_16LE); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:457 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # pkg:gem/prism#lib/prism/parse_result.rb:427 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # pkg:gem/prism#lib/prism/parse_result.rb:394 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:353 + sig { returns(String) } + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:499 + sig { params(other: Prism::Location).returns(Prism::Location) } + def join(other); end + + # Attach a comment to the leading comments of this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:321 + sig { params(comment: Prism::Comment).void } + def leading_comment(comment); end + + # These are the comments that are associated with this location that exist + # before the start of this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:316 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # pkg:gem/prism#lib/prism/parse_result.rb:298 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:485 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The source code that this location represents. + # + # pkg:gem/prism#lib/prism/parse_result.rb:363 + sig { returns(String) } + def slice; end + + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # pkg:gem/prism#lib/prism/parse_result.rb:370 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:358 + sig { returns(T::Array[String]) } + def source_lines; end + + # The column number in characters where this location ends from the start of + # the line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:439 + sig { returns(Integer) } + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # pkg:gem/prism#lib/prism/parse_result.rb:378 + sig { returns(Integer) } + def start_character_offset; end + + # The column number in code units of the given encoding where this location + # starts from the start of the line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:445 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_column(encoding = Encoding::UTF_16LE); end + + # The offset from the start of the file in code units of the given encoding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:383 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_offset(encoding = Encoding::UTF_16LE); end + + # The column number in bytes where this location starts from the start of + # the line. + # + # pkg:gem/prism#lib/prism/parse_result.rb:433 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # pkg:gem/prism#lib/prism/parse_result.rb:416 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:421 + sig { returns(String) } + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # pkg:gem/prism#lib/prism/parse_result.rb:295 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:332 + sig { params(comment: Prism::Comment).void } + def trailing_comment(comment); end + + # These are the comments that are associated with this location that exist + # after the end of this location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:327 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # pkg:gem/prism#lib/prism/parse_result.rb:290 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19858 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# pkg:gem/prism#lib/prism/node.rb:19860 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# pkg:gem/prism#lib/prism/parse_result.rb:571 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # pkg:gem/prism#lib/prism/parse_result.rb:579 + sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:595 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:600 + sig { returns(String) } + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:585 + sig { returns(String) } + def key; end + + # A Location object representing the location of the key in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:573 + sig { returns(Prism::Location) } + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:590 + sig { returns(String) } + def value; end + + # A Location object representing the location of the value in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:576 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13224 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new MatchLastLineNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13226 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13405 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13238 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13302 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13243 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13384 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13358 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13254 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13379 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13345 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + # + # pkg:gem/prism#lib/prism/node.rb:13264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13269 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # pkg:gem/prism#lib/prism/node.rb:13272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13248 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13297 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13282 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13322 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13327 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13317 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13277 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13389 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13287 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13292 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13374 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13332 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13366 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13353 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13340 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13394 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # pkg:gem/prism#lib/prism/node.rb:13371 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13312 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:13307 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13399 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13419 +class Prism::MatchPredicateNode < ::Prism::Node + # Initialize a new MatchPredicateNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13513 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13432 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13437 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13455 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13450 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode + # + # pkg:gem/prism#lib/prism/node.rb:13460 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, pattern: self.pattern, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13465 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:13468 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13442 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13497 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13492 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13479 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:13476 + sig { returns(Prism::Node) } + def pattern; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13487 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13502 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:13473 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13507 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13525 +class Prism::MatchRequiredNode < ::Prism::Node + # Initialize a new MatchRequiredNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13527 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13667 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13538 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13543 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13561 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13556 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode + # + # pkg:gem/prism#lib/prism/node.rb:13566 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, pattern: self.pattern, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13571 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:13574 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13548 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13651 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13646 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # foo => bar + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:13633 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right-hand side of the operator. The type of the node depends on the expression. + # + # Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`. + # + # foo => a # This is equivalent to writing `a = foo` + # ^ + # + # Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant. + # + # foo => [a] + # ^^^ + # + # foo => a, b + # ^^^^ + # + # foo => Bar[a, b] + # ^^^^^^^^^ + # + # If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead. + # + # foo => *, 1, *a + # ^^^^^ + # + # Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`. + # + # foo => { a: 1, b: } + # + # foo => Bar[a: 1, b:] + # + # foo => Bar[**] + # + # To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode` + # + # foo => ^a + # ^^ + # + # Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`. + # + # foo => ^(a + 1) + # + # Anything else will result in the regular node for that expression, for example a `ConstantReadNode`. + # + # foo => CONST + # + # pkg:gem/prism#lib/prism/node.rb:13627 + sig { returns(Prism::Node) } + def pattern; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13641 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13656 + sig { override.returns(Symbol) } + def type; end + + # Represents the left-hand side of the operator. + # + # foo => bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:13582 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13661 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13679 +class Prism::MatchWriteNode < ::Prism::Node + # Initialize a new MatchWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13681 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end + def initialize(source, node_id, location, flags, call, targets); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13754 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13691 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # pkg:gem/prism#lib/prism/node.rb:13732 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13714 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13709 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:13719 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, call: self.call, targets: self.targets); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13724 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } + # + # pkg:gem/prism#lib/prism/node.rb:13727 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13701 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13738 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # pkg:gem/prism#lib/prism/node.rb:13735 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13743 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13748 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax error. +# +# pkg:gem/prism#lib/prism/node.rb:13763 +class Prism::MissingNode < ::Prism::Node + # Initialize a new MissingNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13828 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13773 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13778 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13794 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode + # + # pkg:gem/prism#lib/prism/node.rb:13799 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13804 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:13807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13783 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13812 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13817 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13822 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13837 +class Prism::ModuleNode < ::Prism::Node + # Initialize a new ModuleNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13839 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:13961 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13853 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:13916 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13858 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:13879 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:13871 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode + # + # pkg:gem/prism#lib/prism/node.rb:13913 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode + # + # pkg:gem/prism#lib/prism/node.rb:13884 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, module_keyword_loc: self.module_keyword_loc, constant_path: self.constant_path, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:13889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:13892 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13863 + def each_child_node; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13940 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13919 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:13945 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:13897 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:13935 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:13900 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:13932 + sig { returns(Symbol) } + def name; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13927 + def save_end_keyword_loc(repository); end + + # Save the module_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:13908 + def save_module_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:13950 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:13955 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop +# +# for a, b in [[1, 2], [3, 4]] +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:13982 +class Prism::MultiTargetNode < ::Prism::Node + # Initialize a new MultiTargetNode node. + # + # pkg:gem/prism#lib/prism/node.rb:13984 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14146 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:13997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14025 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14016 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode + # + # pkg:gem/prism#lib/prism/node.rb:14030 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lefts: self.lefts, rest: self.rest, rights: self.rights, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14035 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:14038 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14007 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14130 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, (b, c, *) = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, (b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:14051 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:14120 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14079 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # Represents a splat node in the target expression. + # + # a, (b, *c) = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, (b, *) = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14067 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, (*, b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:14073 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:14125 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14101 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14093 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14115 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14135 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14140 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:14162 +class Prism::MultiWriteNode < ::Prism::Node + # Initialize a new MultiWriteNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14164 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14357 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14179 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14184 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14209 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14199 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode + # + # pkg:gem/prism#lib/prism/node.rb:14214 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lefts: self.lefts, rest: self.rest, rights: self.rights, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14219 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:14222 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14189 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14341 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, b, * = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, b, c = 1, 2, 3, 4, 5 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:14235 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:14326 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14263 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:14336 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14307 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents a splat node in the target expression. + # + # a, b, *c = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, b, * = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14251 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, *, b, c = 1, 2, 3, 4, 5 + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:14257 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:14331 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:14285 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14277 + def save_lparen_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14315 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14299 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14346 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # a, b, c = 1, 2, 3 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:14323 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14351 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# pkg:gem/prism#lib/prism/mutation_compiler.rb:16 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:18 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:23 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:28 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:33 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:38 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:43 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:48 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:53 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:58 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:63 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:68 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:73 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:78 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:83 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:88 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:93 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:98 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:103 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:108 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:113 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:118 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:123 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:128 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:133 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:138 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:143 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:148 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:153 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:158 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:163 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:168 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:173 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:178 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:183 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:188 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:193 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:198 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:203 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:208 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:213 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:218 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:223 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:228 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:233 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:238 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:243 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:248 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:253 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:258 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:263 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:268 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:273 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:278 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:283 + def visit_float_node(node); end + + # Copy a ForNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:288 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:293 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:298 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:303 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:308 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:313 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:318 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:323 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:328 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:333 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:338 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:343 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:348 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:353 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:358 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:363 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:368 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:373 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:378 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:383 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:388 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:393 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:398 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:403 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:408 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:413 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:418 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:423 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:428 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:433 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:438 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:443 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:448 + def visit_interpolated_x_string_node(node); end + + # Copy a ItLocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:453 + def visit_it_local_variable_read_node(node); end + + # Copy a ItParametersNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:458 + def visit_it_parameters_node(node); end + + # Copy a KeywordHashNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:463 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:468 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:473 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:478 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:483 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:488 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:493 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:498 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:503 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:508 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:513 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:518 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:523 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:528 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:533 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:538 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:543 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:548 + def visit_next_node(node); end + + # Copy a NilNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:553 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:558 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:563 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:568 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:573 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:578 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:583 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:588 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:593 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:598 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:603 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:608 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:613 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:618 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:623 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:628 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:633 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:638 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:643 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:648 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:653 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:658 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:663 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:668 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:673 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:678 + def visit_self_node(node); end + + # Copy a ShareableConstantNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:683 + def visit_shareable_constant_node(node); end + + # Copy a SingletonClassNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:688 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:693 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:698 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:703 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:708 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:713 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:718 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:723 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:728 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:733 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:738 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:743 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:748 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:753 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:758 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:763 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # pkg:gem/prism#lib/prism/mutation_compiler.rb:768 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:14375 +class Prism::NextNode < ::Prism::Node + # Initialize a new NextNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14377 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14466 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14387 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:14429 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14392 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14411 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14404 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode + # + # pkg:gem/prism#lib/prism/node.rb:14416 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14421 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:14424 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14397 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14450 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:14445 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:14432 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14440 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14455 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14460 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:14477 +class Prism::NilNode < ::Prism::Node + # Initialize a new NilNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14479 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14542 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14487 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14492 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14508 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14503 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode + # + # pkg:gem/prism#lib/prism/node.rb:14513 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:14521 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14497 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14526 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14531 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14536 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:14552 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # Initialize a new NoKeywordsParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14554 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14655 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14564 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14569 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14585 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14580 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:14590 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14595 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:14598 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14574 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14639 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:14634 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:14616 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:14629 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:14603 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14624 + def save_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14611 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14644 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14649 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# pkg:gem/prism#lib/prism/node.rb:15 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # pkg:gem/prism#lib/prism/node.rb:269 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Returns the first node that matches the given block when visited in a + # breadth-first search. This is useful for finding a node that matches a + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # pkg:gem/prism#lib/prism/node.rb:219 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); end + + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # pkg:gem/prism#lib/prism/node.rb:237 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) } + def breadth_first_search_all(&block); end + + # Delegates to the cached_end_code_units_column of the associated location + # object. + # + # pkg:gem/prism#lib/prism/node.rb:118 + def cached_end_code_units_column(cache); end + + # Delegates to the cached_end_code_units_offset of the associated location + # object. + # + # pkg:gem/prism#lib/prism/node.rb:86 + def cached_end_code_units_offset(cache); end + + # Delegates to the cached_start_code_units_column of the associated location + # object. + # + # pkg:gem/prism#lib/prism/node.rb:112 + def cached_start_code_units_column(cache); end + + # Delegates to the cached_start_code_units_offset of the associated location + # object. + # + # pkg:gem/prism#lib/prism/node.rb:80 + def cached_start_code_units_offset(cache); end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # pkg:gem/prism#lib/prism/node.rb:275 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # pkg:gem/prism#lib/prism/node.rb:296 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # Delegates to the comments of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:133 + def comments; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # pkg:gem/prism#lib/prism/node.rb:290 + sig { abstract.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # pkg:gem/prism#lib/prism/node.rb:279 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # pkg:gem/prism#lib/prism/node_ext.rb:10 + def deprecated(*replacements); end + + # With a block given, yields each child node. Without a block, returns + # an enumerator that contains each child node. Excludes any `nil`s in + # the place of optional nodes that were not present. + # + # pkg:gem/prism#lib/prism/node.rb:284 + def each_child_node; end + + # Delegates to the end_character_column of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:106 + def end_character_column; end + + # Delegates to the end_character_offset of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:74 + def end_character_offset; end + + # Delegates to the end_column of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:96 + def end_column; end + + # Delegates to the end_line of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:50 + def end_line; end + + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # pkg:gem/prism#lib/prism/node.rb:63 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # pkg:gem/prism#lib/prism/node.rb:229 + def find(&block); end + + # pkg:gem/prism#lib/prism/node.rb:248 + def find_all(&block); end + + # Returns a string representation of the node. + # + # pkg:gem/prism#lib/prism/node.rb:301 + sig { abstract.returns(String) } + def inspect; end + + # Delegates to the leading_comments of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:123 + def leading_comments; end + + # A Location instance that represents the location of this node in the + # source. + # + # pkg:gem/prism#lib/prism/node.rb:33 + sig { returns(Prism::Location) } + def location; end + + # Returns true if the node has the newline flag set. + # + # pkg:gem/prism#lib/prism/node.rb:164 + sig { returns(T::Boolean) } + def newline?; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:70 + def newline_flag!(lines); end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:66 + def newline_flag?; end + + # A unique identifier for this node. This is used in a very specific + # use case where you want to keep around a reference to a node without + # having to keep around the syntax tree in memory. This unique identifier + # will be consistent across multiple parses of the same source code. + # + # pkg:gem/prism#lib/prism/node.rb:24 + sig { returns(Integer) } + def node_id; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # pkg:gem/prism#lib/prism/node.rb:175 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # Save this node using a saved source so that it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:27 + def save(repository); end + + # Save the location using a saved source so that it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:40 + def save_location(repository); end + + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # pkg:gem/prism#lib/prism/node.rb:144 + sig { returns(T::Array[String]) } + def script_lines; end + + # Slice the location of the node from the source. + # + # pkg:gem/prism#lib/prism/node.rb:147 + sig { returns(String) } + def slice; end + + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # pkg:gem/prism#lib/prism/node.rb:154 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # pkg:gem/prism#lib/prism/node.rb:138 + sig { returns(T::Array[String]) } + def source_lines; end + + # Delegates to the start_character_column of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:101 + def start_character_column; end + + # Delegates to the start_character_offset of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:69 + def start_character_offset; end + + # Delegates to the start_column of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:91 + def start_column; end + + # Delegates to the start_line of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:45 + def start_line; end + + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # pkg:gem/prism#lib/prism/node.rb:56 + sig { returns(Integer) } + def start_offset; end + + # Returns true if the node has the static literal flag set. + # + # pkg:gem/prism#lib/prism/node.rb:169 + sig { returns(T::Boolean) } + def static_literal?; end + + # Convert this node into a graphviz dot graph string. + # + # pkg:gem/prism#lib/prism/node.rb:183 + sig { returns(String) } + def to_dot; end + + # Delegates to the trailing_comments of the associated location object. + # + # pkg:gem/prism#lib/prism/node.rb:128 + def trailing_comments; end + + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # pkg:gem/prism#lib/prism/node.rb:194 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # pkg:gem/prism#lib/prism/node.rb:317 + sig { abstract.returns(Symbol) } + def type; end + + protected + + # An bitset of flags for this node. There are certain flags that are common + # for all nodes, and then some nodes have specific flags. + # + # pkg:gem/prism#lib/prism/node.rb:160 + sig { returns(Integer) } + def flags; end + + private + + # A pointer to the source that this node was created from. + # + # pkg:gem/prism#lib/prism/node.rb:17 + sig { returns(Prism::Source) } + def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # pkg:gem/prism#lib/prism/node.rb:253 + def fields; end + + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # pkg:gem/prism#lib/prism/node.rb:325 + def type; end + end +end + +# The flags that are common to all nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19957 +module Prism::NodeFlags; end + +# A flag to indicate that the node is a candidate to emit a :line event +# through tracepoint when compiled. +# +# pkg:gem/prism#lib/prism/node.rb:19960 +Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) + +# A flag to indicate that the value that the node represents is a value that +# can be determined at parse-time. +# +# pkg:gem/prism#lib/prism/node.rb:19964 +Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:14666 +class Prism::NumberedParametersNode < ::Prism::Node + # Initialize a new NumberedParametersNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14668 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14735 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14677 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14682 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14698 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14693 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode + # + # pkg:gem/prism#lib/prism/node.rb:14703 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, maximum: self.maximum); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:14711 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14687 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14719 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # pkg:gem/prism#lib/prism/node.rb:14716 + sig { returns(Integer) } + def maximum; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14724 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14729 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# pkg:gem/prism#lib/prism/node.rb:14745 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # Initialize a new NumberedReferenceReadNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14747 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14820 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14756 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14761 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14777 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14772 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode + # + # pkg:gem/prism#lib/prism/node.rb:14782 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, number: self.number); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:14790 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14766 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14804 + sig { override.returns(String) } + def inspect; end + + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # pkg:gem/prism#lib/prism/node.rb:14801 + sig { returns(Integer) } + def number; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14809 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14814 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:14831 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # Initialize a new OptionalKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14833 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:14924 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14866 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14861 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:14871 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14876 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:14879 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14854 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:14908 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:14889 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:14892 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:14884 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:14900 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:14913 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:14905 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:14918 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:14938 +class Prism::OptionalParameterNode < ::Prism::Node + # Initialize a new OptionalParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:14940 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15050 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:14952 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14957 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:14974 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:14969 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:14979 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:14984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:14987 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14962 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15034 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:14997 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15000 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15029 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15013 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:14992 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15008 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15021 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15039 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:15026 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15044 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15064 +class Prism::OrNode < ::Prism::Node + # Initialize a new OrNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15066 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15173 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15077 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15082 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15100 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15095 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode + # + # pkg:gem/prism#lib/prism/node.rb:15105 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15110 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15113 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15087 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15157 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15124 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15152 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:15139 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15133 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15147 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15162 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15167 + def type; end + end +end + +# A parser for the pack template language. +# +# pkg:gem/prism#lib/prism/pack.rb:8 +module Prism::Pack + class << self + # pkg:gem/prism#lib/prism.rb:92 + def parse(_arg0, _arg1, _arg2); end + end +end + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# pkg:gem/prism#lib/prism/pack.rb:62 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # pkg:gem/prism#lib/prism/pack.rb:91 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # pkg:gem/prism#lib/prism/pack.rb:133 + def describe; end + + # The type of endianness of the directive. + # + # pkg:gem/prism#lib/prism/pack.rb:79 + def endian; end + + # The length of this directive (used for integers). + # + # pkg:gem/prism#lib/prism/pack.rb:88 + def length; end + + # The length type of this directive (used for integers). + # + # pkg:gem/prism#lib/prism/pack.rb:85 + def length_type; end + + # The type of signedness of the directive. + # + # pkg:gem/prism#lib/prism/pack.rb:76 + def signed; end + + # The size of the directive. + # + # pkg:gem/prism#lib/prism/pack.rb:82 + def size; end + + # A byteslice of the source string that this directive represents. + # + # pkg:gem/prism#lib/prism/pack.rb:70 + def source; end + + # The type of the directive. + # + # pkg:gem/prism#lib/prism/pack.rb:73 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # pkg:gem/prism#lib/prism/pack.rb:67 + def variant; end + + # A symbol representing the version of Ruby. + # + # pkg:gem/prism#lib/prism/pack.rb:64 + def version; end +end + +# The descriptions of the various types of endianness. +# +# pkg:gem/prism#lib/prism/pack.rb:104 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# pkg:gem/prism#lib/prism/pack.rb:113 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# pkg:gem/prism#lib/prism/pack.rb:120 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# pkg:gem/prism#lib/prism/pack.rb:200 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # pkg:gem/prism#lib/prism/pack.rb:208 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # pkg:gem/prism#lib/prism/pack.rb:214 + def describe; end + + # A list of the directives in the template. + # + # pkg:gem/prism#lib/prism/pack.rb:202 + def directives; end + + # The encoding of the template. + # + # pkg:gem/prism#lib/prism/pack.rb:205 + def encoding; end +end + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/prism#lib/prism/pack.rb:58 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19864 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# pkg:gem/prism#lib/prism/node.rb:19866 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:15186 +class Prism::ParametersNode < ::Prism::Node + # Initialize a new ParametersNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15188 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).void + end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15294 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15203 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # pkg:gem/prism#lib/prism/node.rb:15275 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15239 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15226 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode + # + # pkg:gem/prism#lib/prism/node.rb:15244 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, requireds: self.requireds, optionals: self.optionals, rest: self.rest, posts: self.posts, keywords: self.keywords, keyword_rest: self.keyword_rest, block: self.block); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15249 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } + # + # pkg:gem/prism#lib/prism/node.rb:15252 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15213 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15278 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:15272 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # pkg:gem/prism#lib/prism/node.rb:15269 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # pkg:gem/prism#lib/prism/node.rb:15260 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # pkg:gem/prism#lib/prism/node.rb:15266 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # pkg:gem/prism#lib/prism/node.rb:15257 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:15263 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # pkg:gem/prism#lib/prism/node_ext.rb:272 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } + def signature; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15283 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15288 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15314 +class Prism::ParenthesesNode < ::Prism::Node + # Initialize a new ParenthesesNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15316 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15429 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15327 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:15374 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15408 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15390 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15351 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15344 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode + # + # pkg:gem/prism#lib/prism/node.rb:15356 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, body: self.body, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15364 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15337 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15413 + sig { override.returns(String) } + def inspect; end + + # def multiple_statements?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:15369 + sig { returns(T::Boolean) } + def multiple_statements?; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:86 + def newline_flag!(lines); end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15403 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15377 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15398 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15385 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15418 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15423 + def type; end + end +end + +# Flags for parentheses nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19870 +module Prism::ParenthesesNodeFlags; end + +# parentheses that contain multiple potentially void statements +# +# pkg:gem/prism#lib/prism/node.rb:19872 +Prism::ParenthesesNodeFlags::MULTIPLE_STATEMENTS = T.let(T.unsafe(nil), Integer) + +# This represents an error that was encountered during parsing. +# +# pkg:gem/prism#lib/prism/parse_result.rb:606 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:621 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # pkg:gem/prism#lib/prism/parse_result.rb:629 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # pkg:gem/prism#lib/prism/parse_result.rb:634 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # pkg:gem/prism#lib/prism/parse_result.rb:618 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this error in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:615 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # pkg:gem/prism#lib/prism/parse_result.rb:612 + sig { returns(String) } + def message; end + + # The type of error. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # pkg:gem/prism#lib/prism/parse_result.rb:609 + sig { returns(Symbol) } + def type; end +end + +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# pkg:gem/prism#lib/prism/parse_result.rb:795 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. + # + # pkg:gem/prism#lib/prism/parse_result.rb:801 + sig do + params( + value: [Prism::ProgramNode, T::Array[T.untyped]], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for ParseLexResult. + # + # pkg:gem/prism#lib/prism/parse_result.rb:807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A tuple of the syntax tree and the list of tokens that were parsed from + # the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:798 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# pkg:gem/prism#lib/prism/parse_result.rb:736 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # pkg:gem/prism#lib/prism/parse_result.rb:749 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # pkg:gem/prism#lib/prism/parse_result.rb:760 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # pkg:gem/prism#lib/prism/parse_result.rb:755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of the syntax tree with the errors + # displayed inline. + # + # pkg:gem/prism#lib/prism/parse_result.rb:772 + def errors_format; end + + # Walk the tree and mark nodes that are on a new line, loosely emulating + # the behavior of CRuby's `:line` tracepoint event. + # + # pkg:gem/prism#lib/prism/parse_result.rb:766 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:746 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# pkg:gem/prism#lib/prism/parse_result/comments.rb:20 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # pkg:gem/prism#lib/prism/parse_result/comments.rb:87 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # pkg:gem/prism#lib/prism/parse_result/comments.rb:93 + def attach!; end + + # The parse result that we are attaching comments to. + # + # pkg:gem/prism#lib/prism/parse_result/comments.rb:83 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # pkg:gem/prism#lib/prism/parse_result/comments.rb:120 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# pkg:gem/prism#lib/prism/parse_result/comments.rb:54 +class Prism::ParseResult::Comments::LocationTarget + # pkg:gem/prism#lib/prism/parse_result/comments.rb:57 + def initialize(location); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:69 + def encloses?(comment); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:65 + def end_offset; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:73 + def leading_comment(comment); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:55 + def location; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:61 + def start_offset; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:77 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# pkg:gem/prism#lib/prism/parse_result/comments.rb:23 +class Prism::ParseResult::Comments::NodeTarget + # pkg:gem/prism#lib/prism/parse_result/comments.rb:26 + def initialize(node); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:38 + def encloses?(comment); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:34 + def end_offset; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:43 + def leading_comment(comment); end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:24 + def node; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:30 + def start_offset; end + + # pkg:gem/prism#lib/prism/parse_result/comments.rb:47 + def trailing_comment(comment); end +end + +# An object to represent the set of errors on a parse result. This object +# can be used to format the errors in a human-readable way. +# +# pkg:gem/prism#lib/prism/parse_result/errors.rb:10 +class Prism::ParseResult::Errors + # Initialize a new set of errors from the given parse result. + # + # pkg:gem/prism#lib/prism/parse_result/errors.rb:15 + def initialize(parse_result); end + + # Formats the errors in a human-readable way and return them as a string. + # + # pkg:gem/prism#lib/prism/parse_result/errors.rb:20 + def format; end + + # The parse result that contains the errors. + # + # pkg:gem/prism#lib/prism/parse_result/errors.rb:12 + def parse_result; end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# This file is autoloaded only when `mark_newlines!` is called, so the +# re-opening of the various nodes in this file will only be performed in +# that case. We do that to avoid storing the extra `@newline` instance +# variable on every node if we don't need it. +# +# pkg:gem/prism#lib/prism/parse_result/newlines.rb:26 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:28 + def initialize(lines); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:34 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:48 + def visit_if_node(node); end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:45 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:56 + def visit_statements_node(node); end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:53 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# pkg:gem/prism#lib/prism/parse_result.rb:640 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:655 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # pkg:gem/prism#lib/prism/parse_result.rb:663 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # pkg:gem/prism#lib/prism/parse_result.rb:668 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # pkg:gem/prism#lib/prism/parse_result.rb:652 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this warning in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:649 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # pkg:gem/prism#lib/prism/parse_result.rb:646 + sig { returns(String) } + def message; end + + # The type of warning. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # pkg:gem/prism#lib/prism/parse_result.rb:643 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# pkg:gem/prism#lib/prism/pattern.rb:38 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # pkg:gem/prism#lib/prism/pattern.rb:64 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # pkg:gem/prism#lib/prism/pattern.rb:71 + def compile; end + + # The query that this pattern was initialized with. + # + # pkg:gem/prism#lib/prism/pattern.rb:60 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # pkg:gem/prism#lib/prism/pattern.rb:87 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # pkg:gem/prism#lib/prism/pattern.rb:103 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # pkg:gem/prism#lib/prism/pattern.rb:109 + def combine_or(left, right); end + + # in foo | bar + # + # pkg:gem/prism#lib/prism/pattern.rb:144 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # pkg:gem/prism#lib/prism/pattern.rb:119 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # pkg:gem/prism#lib/prism/pattern.rb:169 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # pkg:gem/prism#lib/prism/pattern.rb:149 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # pkg:gem/prism#lib/prism/pattern.rb:164 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # pkg:gem/prism#lib/prism/pattern.rb:114 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # pkg:gem/prism#lib/prism/pattern.rb:185 + def compile_hash_pattern_node(node); end + + # in nil + # + # pkg:gem/prism#lib/prism/pattern.rb:215 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # pkg:gem/prism#lib/prism/pattern.rb:244 + def compile_node(node); end + + # in /foo/ + # + # pkg:gem/prism#lib/prism/pattern.rb:220 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # pkg:gem/prism#lib/prism/pattern.rb:228 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # pkg:gem/prism#lib/prism/pattern.rb:236 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# pkg:gem/prism#lib/prism/pattern.rb:41 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # pkg:gem/prism#lib/prism/pattern.rb:44 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15442 +class Prism::PinnedExpressionNode < ::Prism::Node + # Initialize a new PinnedExpressionNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15444 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15581 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15456 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15461 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15478 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15473 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode + # + # pkg:gem/prism#lib/prism/node.rb:15483 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, operator_loc: self.operator_loc, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15488 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15491 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15466 + def each_child_node; end + + # The expression used in the pinned expression + # + # foo in ^(bar) + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:15499 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15565 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15555 + sig { returns(String) } + def lparen; end + + # The location of the opening parenthesis. + # + # foo in ^(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15521 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15550 + sig { returns(String) } + def operator; end + + # The location of the `^` operator + # + # foo in ^(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15505 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15560 + sig { returns(String) } + def rparen; end + + # The location of the closing parenthesis. + # + # foo in ^(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15537 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15529 + def save_lparen_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15513 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15545 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15570 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15575 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15594 +class Prism::PinnedVariableNode < ::Prism::Node + # Initialize a new PinnedVariableNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15596 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, variable, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15689 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15606 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15628 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode + # + # pkg:gem/prism#lib/prism/node.rb:15633 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, variable: self.variable, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15638 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15641 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15616 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15673 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15668 + sig { returns(String) } + def operator; end + + # The location of the `^` operator + # + # foo in ^bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15655 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15663 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15678 + sig { override.returns(Symbol) } + def type; end + + # The variable used in the pinned expression + # + # foo in ^bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:15649 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15683 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15700 +class Prism::PostExecutionNode < ::Prism::Node + # Initialize a new PostExecutionNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15702 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15829 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15714 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15719 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15808 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15785 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15738 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15731 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode + # + # pkg:gem/prism#lib/prism/node.rb:15743 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, statements: self.statements, keyword_loc: self.keyword_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15751 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15724 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15813 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15798 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15759 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15803 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15772 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15793 + def save_closing_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15767 + def save_keyword_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15780 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:15756 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15818 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15823 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:15842 +class Prism::PreExecutionNode < ::Prism::Node + # Initialize a new PreExecutionNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15844 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:15971 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15856 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15950 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15927 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:15880 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:15873 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode + # + # pkg:gem/prism#lib/prism/node.rb:15885 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, statements: self.statements, keyword_loc: self.keyword_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15890 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:15893 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15866 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:15955 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15940 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15901 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:15945 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:15914 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15935 + def save_closing_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15909 + def save_keyword_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:15922 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:15898 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:15960 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:15965 + def type; end + end +end + +# The top level node of any parse tree. +# +# pkg:gem/prism#lib/prism/node.rb:15981 +class Prism::ProgramNode < ::Prism::Node + # Initialize a new ProgramNode node. + # + # pkg:gem/prism#lib/prism/node.rb:15983 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end + def initialize(source, node_id, location, flags, locals, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16055 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:15993 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:15998 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16010 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode + # + # pkg:gem/prism#lib/prism/node.rb:16020 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, statements: self.statements); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } + # + # pkg:gem/prism#lib/prism/node.rb:16028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16003 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16039 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:16033 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # pkg:gem/prism#lib/prism/node.rb:16036 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16044 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16049 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19876 +module Prism::RangeFlags; end + +# ... operator +# +# pkg:gem/prism#lib/prism/node.rb:19878 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:16070 +class Prism::RangeNode < ::Prism::Node + # Initialize a new RangeNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16072 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16185 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16083 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16109 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16101 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode + # + # pkg:gem/prism#lib/prism/node.rb:16114 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:16122 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16093 + def each_child_node; end + + # def exclude_end?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16127 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16169 + sig { override.returns(String) } + def inspect; end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:16138 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:16164 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # pkg:gem/prism#lib/prism/node.rb:16151 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # pkg:gem/prism#lib/prism/node.rb:16148 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16159 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16174 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16179 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:16198 +class Prism::RationalNode < ::Prism::Node + # Initialize a new RationalNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16200 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).void + end + def initialize(source, node_id, location, flags, numerator, denominator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16210 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16249 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16215 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16231 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16226 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode + # + # pkg:gem/prism#lib/prism/node.rb:16236 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, numerator: self.numerator, denominator: self.denominator); end + + # def decimal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16254 + sig { returns(T::Boolean) } + def decimal?; end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16241 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } + # + # pkg:gem/prism#lib/prism/node.rb:16244 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The denominator of the rational number. + # + # 1.5r # denominator 2 + # + # pkg:gem/prism#lib/prism/node.rb:16276 + sig { returns(Integer) } + def denominator; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16220 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16264 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16279 + sig { override.returns(String) } + def inspect; end + + # The numerator of the rational number. + # + # 1.5r # numerator 3 + # + # pkg:gem/prism#lib/prism/node.rb:16271 + sig { returns(Integer) } + def numerator; end + + # Returns the value of the node as an IntegerNode or a FloatNode. This + # method is deprecated in favor of #value or #numerator/#denominator. + # + # pkg:gem/prism#lib/prism/node_ext.rb:123 + def numeric; end + + # def octal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16259 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16284 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # pkg:gem/prism#lib/prism/node_ext.rb:117 + sig { returns(Rational) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16289 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:16307 +class Prism::RedoNode < ::Prism::Node + # Initialize a new RedoNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16309 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16372 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16338 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16333 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode + # + # pkg:gem/prism#lib/prism/node.rb:16343 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16348 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:16351 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16327 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16356 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16361 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16366 + def type; end + end +end + +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# pkg:gem/prism#lib/prism/reflection.rb:16 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # pkg:gem/prism#lib/prism/reflection.rb:107 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:48 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:58 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# pkg:gem/prism#lib/prism/reflection.rb:19 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # pkg:gem/prism#lib/prism/reflection.rb:24 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # pkg:gem/prism#lib/prism/reflection.rb:21 + sig { returns(Symbol) } + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# pkg:gem/prism#lib/prism/reflection.rb:95 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # pkg:gem/prism#lib/prism/reflection.rb:100 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # pkg:gem/prism#lib/prism/reflection.rb:97 + sig { returns(T::Array[Symbol]) } + def flags; end +end + +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:88 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:82 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:70 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:31 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:42 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:53 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:76 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:37 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# pkg:gem/prism#lib/prism/reflection.rb:64 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# Flags for regular expression and match last line nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19882 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# pkg:gem/prism#lib/prism/node.rb:19899 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# pkg:gem/prism#lib/prism/node.rb:19896 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# pkg:gem/prism#lib/prism/node.rb:19887 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# pkg:gem/prism#lib/prism/node.rb:19911 +Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# pkg:gem/prism#lib/prism/node.rb:19914 +Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# pkg:gem/prism#lib/prism/node.rb:19908 +Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# pkg:gem/prism#lib/prism/node.rb:19884 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# pkg:gem/prism#lib/prism/node.rb:19890 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# pkg:gem/prism#lib/prism/node.rb:19893 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# pkg:gem/prism#lib/prism/node.rb:19905 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# pkg:gem/prism#lib/prism/node.rb:19902 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:16381 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new RegularExpressionNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16383 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16562 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16395 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16459 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16400 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:16541 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16515 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16416 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16411 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:16536 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16502 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + # + # pkg:gem/prism#lib/prism/node.rb:16421 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16426 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # pkg:gem/prism#lib/prism/node.rb:16429 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16405 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16454 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16439 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16479 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16484 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16474 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16434 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16546 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16444 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16449 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:16531 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16489 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16523 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16510 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16497 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16551 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # pkg:gem/prism#lib/prism/node.rb:16528 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16469 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16464 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16556 + def type; end + end +end + +# pkg:gem/prism#lib/prism/node_ext.rb:23 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # pkg:gem/prism#lib/prism/node_ext.rb:26 + def options; end +end + +# Prism parses deterministically for the same input. This provides a nice +# property that is exposed through the #node_id API on nodes. Effectively this +# means that for the same input, these values will remain consistent every +# time the source is parsed. This means we can reparse the source same with a +# #node_id value and find the exact same node again. +# +# The Relocation module provides an API around this property. It allows you to +# "save" nodes and locations using a minimal amount of memory (just the +# node_id and a field identifier) and then reify them later. +# +# pkg:gem/prism#lib/prism/relocation.rb:14 +module Prism::Relocation + class << self + # Create a new repository for the given filepath. + # + # pkg:gem/prism#lib/prism/relocation.rb:496 + def filepath(value); end + + # Create a new repository for the given string. + # + # pkg:gem/prism#lib/prism/relocation.rb:501 + def string(value); end + end +end + +# A field representing the start and end character columns. +# +# pkg:gem/prism#lib/prism/relocation.rb:270 +class Prism::Relocation::CharacterColumnsField + # Fetches the start and end character column of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:272 + def fields(value); end +end + +# A field representing the start and end character offsets. +# +# pkg:gem/prism#lib/prism/relocation.rb:218 +class Prism::Relocation::CharacterOffsetsField + # Fetches the start and end character offset of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:220 + def fields(value); end +end + +# A field representing the start and end code unit columns for a specific +# encoding. +# +# pkg:gem/prism#lib/prism/relocation.rb:282 +class Prism::Relocation::CodeUnitColumnsField + # Initialize a new field with the associated repository and encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:291 + def initialize(repository, encoding); end + + # The associated encoding for the code units. + # + # pkg:gem/prism#lib/prism/relocation.rb:288 + def encoding; end + + # Fetches the start and end code units column of a value for a particular + # encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:299 + def fields(value); end + + # The repository object that is used for lazily creating a code units + # cache. + # + # pkg:gem/prism#lib/prism/relocation.rb:285 + def repository; end + + private + + # Lazily create a code units cache for the associated encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:309 + def cache; end +end + +# A field representing the start and end code unit offsets. +# +# pkg:gem/prism#lib/prism/relocation.rb:229 +class Prism::Relocation::CodeUnitOffsetsField + # Initialize a new field with the associated repository and encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:238 + def initialize(repository, encoding); end + + # The associated encoding for the code units. + # + # pkg:gem/prism#lib/prism/relocation.rb:235 + def encoding; end + + # Fetches the start and end code units offset of a value for a particular + # encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:246 + def fields(value); end + + # A pointer to the repository object that is used for lazily creating a + # code units cache. + # + # pkg:gem/prism#lib/prism/relocation.rb:232 + def repository; end + + private + + # Lazily create a code units cache for the associated encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:256 + def cache; end +end + +# A field representing the start and end byte columns. +# +# pkg:gem/prism#lib/prism/relocation.rb:262 +class Prism::Relocation::ColumnsField + # Fetches the start and end byte column of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:264 + def fields(value); end +end + +# An abstract field used as the parent class of the two comments fields. +# +# pkg:gem/prism#lib/prism/relocation.rb:315 +class Prism::Relocation::CommentsField + private + + # Create comment objects from the given values. + # + # pkg:gem/prism#lib/prism/relocation.rb:330 + def comments(values); end +end + +# An object that represents a slice of a comment. +# +# pkg:gem/prism#lib/prism/relocation.rb:317 +class Prism::Relocation::CommentsField::Comment + # Initialize a new comment with the given slice. + # + # pkg:gem/prism#lib/prism/relocation.rb:322 + def initialize(slice); end + + # The slice of the comment. + # + # pkg:gem/prism#lib/prism/relocation.rb:319 + def slice; end +end + +# An entry in a repository that will lazily reify its values when they are +# first accessed. +# +# pkg:gem/prism#lib/prism/relocation.rb:17 +class Prism::Relocation::Entry + # Initialize a new entry with the given repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:25 + def initialize(repository); end + + # Fetch the leading and trailing comments of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:120 + def comments; end + + # Fetch the end character column of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:93 + def end_character_column; end + + # Fetch the end character offset of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:61 + def end_character_offset; end + + # Fetch the end code units column of the value, for the encoding that was + # configured on the repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:105 + def end_code_units_column; end + + # Fetch the end code units offset of the value, for the encoding that was + # configured on the repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:73 + def end_code_units_offset; end + + # Fetch the end byte column of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:83 + def end_column; end + + # Fetch the end line of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:41 + def end_line; end + + # Fetch the end byte offset of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:51 + def end_offset; end + + # Fetch the filepath of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:31 + def filepath; end + + # Fetch the leading comments of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:110 + def leading_comments; end + + # Reify the values on this entry with the given values. This is an + # internal-only API that is called from the repository when it is time to + # reify the values. + # + # pkg:gem/prism#lib/prism/relocation.rb:127 + def reify!(values); end + + # Fetch the start character column of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:88 + def start_character_column; end + + # Fetch the start character offset of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:56 + def start_character_offset; end + + # Fetch the start code units column of the value, for the encoding that + # was configured on the repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:99 + def start_code_units_column; end + + # Fetch the start code units offset of the value, for the encoding that + # was configured on the repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:67 + def start_code_units_offset; end + + # Fetch the start byte column of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:78 + def start_column; end + + # Fetch the start line of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:36 + def start_line; end + + # Fetch the start byte offset of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:46 + def start_offset; end + + # Fetch the trailing comments of the value. + # + # pkg:gem/prism#lib/prism/relocation.rb:115 + def trailing_comments; end + + private + + # Fetch a value from the entry, raising an error if it is missing. + # + # pkg:gem/prism#lib/prism/relocation.rb:135 + def fetch_value(name); end + + # Return the values from the repository, reifying them if necessary. + # + # pkg:gem/prism#lib/prism/relocation.rb:143 + def values; end +end + +# Raised if a value that could potentially be on an entry is missing +# because it was either not configured on the repository or it has not yet +# been fetched. +# +# pkg:gem/prism#lib/prism/relocation.rb:21 +class Prism::Relocation::Entry::MissingValueError < ::StandardError; end + +# A field that represents the file path. +# +# pkg:gem/prism#lib/prism/relocation.rb:186 +class Prism::Relocation::FilepathField + # Initialize a new field with the given file path. + # + # pkg:gem/prism#lib/prism/relocation.rb:191 + def initialize(value); end + + # Fetch the file path. + # + # pkg:gem/prism#lib/prism/relocation.rb:196 + def fields(_value); end + + # The file path that this field represents. + # + # pkg:gem/prism#lib/prism/relocation.rb:188 + def value; end +end + +# A field representing the leading comments. +# +# pkg:gem/prism#lib/prism/relocation.rb:336 +class Prism::Relocation::LeadingCommentsField < ::Prism::Relocation::CommentsField + # Fetches the leading comments of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:338 + def fields(value); end +end + +# A field representing the start and end lines. +# +# pkg:gem/prism#lib/prism/relocation.rb:202 +class Prism::Relocation::LinesField + # Fetches the start and end line of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:204 + def fields(value); end +end + +# A field representing the start and end byte offsets. +# +# pkg:gem/prism#lib/prism/relocation.rb:210 +class Prism::Relocation::OffsetsField + # Fetches the start and end byte offset of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:212 + def fields(value); end +end + +# A repository is a configured collection of fields and a set of entries +# that knows how to reparse a source and reify the values. +# +# pkg:gem/prism#lib/prism/relocation.rb:353 +class Prism::Relocation::Repository + # Initialize a new repository with the given source. + # + # pkg:gem/prism#lib/prism/relocation.rb:370 + def initialize(source); end + + # Configure the character columns field for this repository and return + # self. + # + # pkg:gem/prism#lib/prism/relocation.rb:416 + def character_columns; end + + # Configure the character offsets field for this repository and return + # self. + # + # pkg:gem/prism#lib/prism/relocation.rb:399 + def character_offsets; end + + # Configure the code unit columns field for this repository for a specific + # encoding and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:422 + def code_unit_columns(encoding); end + + # Configure the code unit offsets field for this repository for a specific + # encoding and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:405 + def code_unit_offsets(encoding); end + + # Create a code units cache for the given encoding from the source. + # + # pkg:gem/prism#lib/prism/relocation.rb:377 + def code_units_cache(encoding); end + + # Configure the columns field for this repository and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:410 + def columns; end + + # Configure both the leading and trailing comment fields for this + # repository and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:440 + def comments; end + + # This method is called from nodes and locations when they want to enter + # themselves into the repository. It it internal-only and meant to be + # called from the #save* APIs. + # + # pkg:gem/prism#lib/prism/relocation.rb:447 + def enter(node_id, field_name); end + + # The entries that have been saved on this repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:367 + def entries; end + + # The fields that have been configured on this repository. + # + # pkg:gem/prism#lib/prism/relocation.rb:364 + def fields; end + + # Configure the filepath field for this repository and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:382 + def filepath; end + + # Configure the leading comments field for this repository and return + # self. + # + # pkg:gem/prism#lib/prism/relocation.rb:428 + def leading_comments; end + + # Configure the lines field for this repository and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:388 + def lines; end + + # Configure the offsets field for this repository and return self. + # + # pkg:gem/prism#lib/prism/relocation.rb:393 + def offsets; end + + # This method is called from the entries in the repository when they need + # to reify their values. It is internal-only and meant to be called from + # the various value APIs. + # + # pkg:gem/prism#lib/prism/relocation.rb:456 + def reify!; end + + # The source associated with this repository. This will be either a + # SourceFilepath (the most common use case) or a SourceString. + # + # pkg:gem/prism#lib/prism/relocation.rb:361 + def source; end + + # Configure the trailing comments field for this repository and return + # self. + # + # pkg:gem/prism#lib/prism/relocation.rb:434 + def trailing_comments; end + + private + + # Append the given field to the repository and return the repository so + # that these calls can be chained. + # + # pkg:gem/prism#lib/prism/relocation.rb:488 + def field(name, value); end +end + +# Raised when multiple fields of the same type are configured on the same +# repository. +# +# pkg:gem/prism#lib/prism/relocation.rb:356 +class Prism::Relocation::Repository::ConfigurationError < ::StandardError; end + +# Represents the source of a repository that will be reparsed. +# +# pkg:gem/prism#lib/prism/relocation.rb:149 +class Prism::Relocation::Source + # Initialize the source with the given value. + # + # pkg:gem/prism#lib/prism/relocation.rb:154 + def initialize(value); end + + # Create a code units cache for the given encoding. + # + # pkg:gem/prism#lib/prism/relocation.rb:164 + def code_units_cache(encoding); end + + # Reparse the value and return the parse result. + # + # pkg:gem/prism#lib/prism/relocation.rb:159 + def result; end + + # The value that will need to be reparsed. + # + # pkg:gem/prism#lib/prism/relocation.rb:151 + def value; end +end + +# A source that is represented by a file path. +# +# pkg:gem/prism#lib/prism/relocation.rb:170 +class Prism::Relocation::SourceFilepath < ::Prism::Relocation::Source + # Reparse the file and return the parse result. + # + # pkg:gem/prism#lib/prism/relocation.rb:172 + def result; end +end + +# A source that is represented by a string. +# +# pkg:gem/prism#lib/prism/relocation.rb:178 +class Prism::Relocation::SourceString < ::Prism::Relocation::Source + # Reparse the string and return the parse result. + # + # pkg:gem/prism#lib/prism/relocation.rb:180 + def result; end +end + +# A field representing the trailing comments. +# +# pkg:gem/prism#lib/prism/relocation.rb:344 +class Prism::Relocation::TrailingCommentsField < ::Prism::Relocation::CommentsField + # Fetches the trailing comments of a value. + # + # pkg:gem/prism#lib/prism/relocation.rb:346 + def fields(value); end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:16577 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # Initialize a new RequiredKeywordParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16579 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16665 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16589 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16610 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16605 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:16615 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16620 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:16623 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16599 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16649 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:16633 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16636 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16628 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16644 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16654 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16659 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:16678 +class Prism::RequiredParameterNode < ::Prism::Node + # Initialize a new RequiredParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16680 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16752 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16710 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16705 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:16715 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16720 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # pkg:gem/prism#lib/prism/node.rb:16723 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16699 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16736 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # pkg:gem/prism#lib/prism/node.rb:16733 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:16728 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16741 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16746 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:16763 +class Prism::RescueModifierNode < ::Prism::Node + # Initialize a new RescueModifierNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:16857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16776 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16799 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16794 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode + # + # pkg:gem/prism#lib/prism/node.rb:16804 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, keyword_loc: self.keyword_loc, rescue_expression: self.rescue_expression); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16809 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } + # + # pkg:gem/prism#lib/prism/node.rb:16812 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16786 + def each_child_node; end + + # attr_reader expression: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:16817 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:16841 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:16836 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16820 + sig { returns(Prism::Location) } + def keyword_loc; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:116 + def newline_flag!(lines); end + + # attr_reader rescue_expression: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:16833 + sig { returns(Prism::Node) } + def rescue_expression; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16828 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:16846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:16851 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. +# +# pkg:gem/prism#lib/prism/node.rb:16874 +class Prism::RescueNode < ::Prism::Node + # Initialize a new RescueNode node. + # + # pkg:gem/prism#lib/prism/node.rb:16876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, then_keyword_loc, statements, subsequent); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17033 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:16891 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16896 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:16921 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:16911 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent rescue clause of the rescue node. This method is + # deprecated in favor of #subsequent. + # + # pkg:gem/prism#lib/prism/node_ext.rb:497 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode + # + # pkg:gem/prism#lib/prism/node.rb:16926 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, exceptions: self.exceptions, operator_loc: self.operator_loc, reference: self.reference, then_keyword_loc: self.then_keyword_loc, statements: self.statements, subsequent: self.subsequent); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:16931 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? } + # + # pkg:gem/prism#lib/prism/node.rb:16934 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16901 + def each_child_node; end + + # attr_reader exceptions: Array[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16952 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17017 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17002 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:16939 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:17007 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:16955 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:16974 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end + def reference; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16947 + def save_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16969 + def save_operator_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:16991 + def save_then_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:16996 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # attr_reader subsequent: RescueNode? + # + # pkg:gem/prism#lib/prism/node.rb:16999 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # def then_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:17012 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:16977 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17022 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17027 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:17051 +class Prism::RestParameterNode < ::Prism::Node + # Initialize a new RestParameterNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17053 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17164 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17085 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17080 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode + # + # pkg:gem/prism#lib/prism/node.rb:17090 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17095 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17098 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17074 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17148 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # pkg:gem/prism#lib/prism/node.rb:17108 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:17111 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17143 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17130 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17103 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17125 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17138 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17153 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17158 + def type; end + end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# pkg:gem/prism#lib/prism/parse_result.rb:676 +class Prism::Result + # Create a new result object with the given values. + # + # pkg:gem/prism#lib/prism/parse_result.rb:698 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # Create a code units cache for the given encoding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:730 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # The list of comments that were encountered during parsing. + # + # pkg:gem/prism#lib/prism/parse_result.rb:678 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # pkg:gem/prism#lib/prism/parse_result.rb:686 + sig { returns(T.nilable(Prism::Location)) } + def data_loc; end + + # Implement the hash pattern matching interface for Result. + # + # pkg:gem/prism#lib/prism/parse_result.rb:708 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns the encoding of the source code that was parsed. + # + # pkg:gem/prism#lib/prism/parse_result.rb:713 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # pkg:gem/prism#lib/prism/parse_result.rb:689 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # pkg:gem/prism#lib/prism/parse_result.rb:725 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # pkg:gem/prism#lib/prism/parse_result.rb:681 + sig { returns(T::Array[Prism::MagicComment]) } + def magic_comments; end + + # A Source instance that represents the source code that was parsed. + # + # pkg:gem/prism#lib/prism/parse_result.rb:695 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # pkg:gem/prism#lib/prism/parse_result.rb:719 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # pkg:gem/prism#lib/prism/parse_result.rb:692 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17177 +class Prism::RetryNode < ::Prism::Node + # Initialize a new RetryNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17179 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17242 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17208 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17203 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode + # + # pkg:gem/prism#lib/prism/node.rb:17213 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17218 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17221 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17197 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17226 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17231 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17236 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17251 +class Prism::ReturnNode < ::Prism::Node + # Initialize a new ReturnNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17253 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17342 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17263 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:17318 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17268 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17287 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17280 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode + # + # pkg:gem/prism#lib/prism/node.rb:17292 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, arguments: self.arguments); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } + # + # pkg:gem/prism#lib/prism/node.rb:17300 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17273 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17326 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17321 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17305 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17313 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17331 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17336 + def type; end + end +end + +# This object is passed to the various Prism.* methods that accept the +# `scopes` option as an element of the list. It defines both the local +# variables visible at that scope as well as the forwarding parameters +# available at that scope. +# +# pkg:gem/prism#lib/prism/parse_result.rb:884 +class Prism::Scope + # Create a new scope object with the given locals and forwarding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:895 + sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).void } + def initialize(locals, forwarding); end + + # The list of local variables that are forwarded to the next scope. This + # should by defined as an array of symbols containing the specific values of + # :*, :**, :&, or :"...". + # + # pkg:gem/prism#lib/prism/parse_result.rb:892 + sig { returns(T::Array[Symbol]) } + def forwarding; end + + # The list of local variables that are defined in this scope. This should be + # defined as an array of symbols. + # + # pkg:gem/prism#lib/prism/parse_result.rb:887 + sig { returns(T::Array[Symbol]) } + def locals; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17353 +class Prism::SelfNode < ::Prism::Node + # Initialize a new SelfNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17355 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17418 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17363 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17368 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17384 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17379 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode + # + # pkg:gem/prism#lib/prism/node.rb:17389 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17394 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17397 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17373 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17402 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17407 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17412 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# pkg:gem/prism#lib/prism/serialize.rb:17 +module Prism::Serialize + class << self + # Deserialize the dumped output from a request to lex or lex_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # pkg:gem/prism#lib/prism/serialize.rb:87 + def load_lex(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse or parse_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # pkg:gem/prism#lib/prism/serialize.rb:34 + def load_parse(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse_comments or + # parse_file_comments. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # pkg:gem/prism#lib/prism/serialize.rb:131 + def load_parse_comments(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse_lex or + # parse_lex_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # pkg:gem/prism#lib/prism/serialize.rb:153 + def load_parse_lex(input, serialized, freeze); end + end +end + +# pkg:gem/prism#lib/prism/serialize.rb:202 +class Prism::Serialize::ConstantPool + # pkg:gem/prism#lib/prism/serialize.rb:205 + def initialize(input, serialized, base, size); end + + # pkg:gem/prism#lib/prism/serialize.rb:213 + def get(index, encoding); end + + # pkg:gem/prism#lib/prism/serialize.rb:203 + def size; end +end + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# pkg:gem/prism#lib/prism/serialize.rb:256 +Prism::Serialize::FastStringIO = StringIO + +# pkg:gem/prism#lib/prism/serialize.rb:259 +class Prism::Serialize::Loader + # pkg:gem/prism#lib/prism/serialize.rb:262 + def initialize(source, serialized); end + + # pkg:gem/prism#lib/prism/serialize.rb:270 + def eof?; end + + # pkg:gem/prism#lib/prism/serialize.rb:260 + def input; end + + # pkg:gem/prism#lib/prism/serialize.rb:260 + def io; end + + # pkg:gem/prism#lib/prism/serialize.rb:304 + def load_comments(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:831 + def load_constant(constant_pool, encoding); end + + # pkg:gem/prism#lib/prism/serialize.rb:275 + def load_constant_pool(constant_pool); end + + # pkg:gem/prism#lib/prism/serialize.rb:782 + def load_double; end + + # pkg:gem/prism#lib/prism/serialize.rb:797 + def load_embedded_string(encoding); end + + # pkg:gem/prism#lib/prism/serialize.rb:292 + def load_encoding; end + + # pkg:gem/prism#lib/prism/serialize.rb:667 + def load_error_level; end + + # pkg:gem/prism#lib/prism/serialize.rb:682 + def load_errors(encoding, freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:286 + def load_header; end + + # pkg:gem/prism#lib/prism/serialize.rb:771 + def load_integer; end + + # pkg:gem/prism#lib/prism/serialize.rb:298 + def load_line_offsets(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:818 + def load_location(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:812 + def load_location_object(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:321 + def load_magic_comments(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:842 + def load_node(constant_pool, encoding, freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:836 + def load_optional_constant(constant_pool, encoding); end + + # pkg:gem/prism#lib/prism/serialize.rb:823 + def load_optional_location(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:827 + def load_optional_location_object(freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:790 + def load_optional_node(constant_pool, encoding, freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:801 + def load_string(encoding); end + + # pkg:gem/prism#lib/prism/serialize.rb:733 + def load_tokens; end + + # pkg:gem/prism#lib/prism/serialize.rb:786 + def load_uint32; end + + # pkg:gem/prism#lib/prism/serialize.rb:766 + def load_varsint; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # pkg:gem/prism#lib/prism/serialize.rb:752 + def load_varuint; end + + # pkg:gem/prism#lib/prism/serialize.rb:701 + def load_warning_level; end + + # pkg:gem/prism#lib/prism/serialize.rb:714 + def load_warnings(encoding, freeze); end + + # pkg:gem/prism#lib/prism/serialize.rb:260 + def source; end +end + +# pkg:gem/prism#lib/prism/serialize.rb:338 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# pkg:gem/prism#lib/prism/serialize.rb:20 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# pkg:gem/prism#lib/prism/serialize.rb:24 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# pkg:gem/prism#lib/prism/serialize.rb:28 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# pkg:gem/prism#lib/prism/serialize.rb:2227 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17428 +class Prism::ShareableConstantNode < ::Prism::Node + # Initialize a new ShareableConstantNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17430 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).void + end + def initialize(source, node_id, location, flags, write); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17513 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17439 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17444 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17461 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17456 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode + # + # pkg:gem/prism#lib/prism/node.rb:17466 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, write: self.write); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17471 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } + # + # pkg:gem/prism#lib/prism/node.rb:17474 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17449 + def each_child_node; end + + # def experimental_copy?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17489 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17484 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17497 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17479 + sig { returns(T::Boolean) } + def literal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17502 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # pkg:gem/prism#lib/prism/node.rb:17494 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17507 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19918 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# pkg:gem/prism#lib/prism/node.rb:19926 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value experimental everything +# +# pkg:gem/prism#lib/prism/node.rb:19923 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value literal +# +# pkg:gem/prism#lib/prism/node.rb:19920 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17524 +class Prism::SingletonClassNode < ::Prism::Node + # Initialize a new SingletonClassNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17526 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17663 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:17616 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17632 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17587 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17566 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17558 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode + # + # pkg:gem/prism#lib/prism/node.rb:17571 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, class_keyword_loc: self.class_keyword_loc, operator_loc: self.operator_loc, expression: self.expression, body: self.body, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17576 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17579 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17550 + def each_child_node; end + + # def end_keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17642 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17619 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:17613 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17647 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # pkg:gem/prism#lib/prism/node.rb:17584 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17637 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17600 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the class_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17595 + def save_class_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17627 + def save_end_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17608 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17652 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17657 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# pkg:gem/prism#lib/prism/parse_result.rb:8 +class Prism::Source + # Create a new source object with the given source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:46 + sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } + def initialize(source, start_line = 1, offsets = []); end + + # Converts the line number and column in bytes to a byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:80 + def byte_offset(line, column); end + + # Return the column number in characters for the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:117 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:112 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # pkg:gem/prism#lib/prism/parse_result.rb:145 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:151 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # pkg:gem/prism#lib/prism/parse_result.rb:133 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:107 + sig { params(byte_offset: Integer).returns(Integer) } + def column(byte_offset); end + + # Freeze this object and the objects it contains. + # + # pkg:gem/prism#lib/prism/parse_result.rb:156 + def deep_freeze; end + + # Returns the encoding of the source code, which is set by parameters to the + # parser or by the encoding magic comment. + # + # pkg:gem/prism#lib/prism/parse_result.rb:64 + sig { returns(Encoding) } + def encoding; end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:90 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:102 + def line_end(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:96 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # Returns the lines of the source code as an array of strings. + # + # pkg:gem/prism#lib/prism/parse_result.rb:69 + sig { returns(T::Array[String]) } + def lines; end + + # The list of newline byte offsets in the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:43 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Replace the value of offsets with the given value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:58 + sig { params(offsets: T::Array[Integer]).void } + def replace_offsets(offsets); end + + # Replace the value of start_line with the given value. + # + # pkg:gem/prism#lib/prism/parse_result.rb:53 + sig { params(start_line: Integer).void } + def replace_start_line(start_line); end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # pkg:gem/prism#lib/prism/parse_result.rb:75 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # pkg:gem/prism#lib/prism/parse_result.rb:37 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # pkg:gem/prism#lib/prism/parse_result.rb:40 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:166 + def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # pkg:gem/prism#lib/prism/parse_result.rb:13 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17679 +class Prism::SourceEncodingNode < ::Prism::Node + # Initialize a new SourceEncodingNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17681 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17744 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17710 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17705 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode + # + # pkg:gem/prism#lib/prism/node.rb:17715 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17720 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17723 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17699 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17728 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17733 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17738 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17753 +class Prism::SourceFileNode < ::Prism::Node + # Initialize a new SourceFileNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17755 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void + end + def initialize(source, node_id, location, flags, filepath); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17842 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17764 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17769 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17785 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17780 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode + # + # pkg:gem/prism#lib/prism/node.rb:17790 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, filepath: self.filepath); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17795 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } + # + # pkg:gem/prism#lib/prism/node.rb:17798 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17774 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # pkg:gem/prism#lib/prism/node.rb:17823 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17808 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17803 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17813 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17826 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:17818 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17831 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17836 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:17853 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17855 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:17918 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17863 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17868 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17884 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17879 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode + # + # pkg:gem/prism#lib/prism/node.rb:17889 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:17897 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17873 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:17902 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:17907 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:17912 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# pkg:gem/prism#lib/prism/node.rb:17927 +class Prism::SplatNode < ::Prism::Node + # Initialize a new SplatNode node. + # + # pkg:gem/prism#lib/prism/node.rb:17929 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18018 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:17939 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17944 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:17963 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:17956 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode + # + # pkg:gem/prism#lib/prism/node.rb:17968 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, expression: self.expression); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:17973 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } + # + # pkg:gem/prism#lib/prism/node.rb:17976 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17949 + def each_child_node; end + + # attr_reader expression: Prism::node? + # + # pkg:gem/prism#lib/prism/node.rb:17994 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18002 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:17997 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:17981 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:17989 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18007 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18012 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18029 +class Prism::StatementsNode < ::Prism::Node + # Initialize a new StatementsNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18031 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18099 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18040 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18080 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18045 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18062 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18057 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode + # + # pkg:gem/prism#lib/prism/node.rb:18067 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, body: self.body); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18072 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } + # + # pkg:gem/prism#lib/prism/node.rb:18075 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18050 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18083 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18088 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18093 + def type; end + end +end + +# Flags for string nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19930 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# pkg:gem/prism#lib/prism/node.rb:19935 +Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# pkg:gem/prism#lib/prism/node.rb:19932 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/node.rb:19938 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/node.rb:19941 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18116 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new StringNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18118 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18274 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18130 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18135 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18253 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18221 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18151 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18146 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:18248 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:18208 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + # + # pkg:gem/prism#lib/prism/node.rb:18156 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } + # + # pkg:gem/prism#lib/prism/node.rb:18164 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18140 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18174 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18169 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18179 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18258 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18184 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18243 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18189 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18235 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18216 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18203 + def save_opening_loc(repository); end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # pkg:gem/prism#lib/prism/node_ext.rb:75 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18263 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # pkg:gem/prism#lib/prism/node.rb:18240 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18268 + def type; end + end +end + +# Here we are going to patch StringQuery to put in the class-level methods so +# that it can maintain a consistent interface +# Query methods that allow categorizing strings based on their context for +# where they could be valid in a Ruby syntax tree. +# +# pkg:gem/prism#lib/prism/string_query.rb:7 +class Prism::StringQuery + # Initialize a new query with the given string. + # + # pkg:gem/prism#lib/prism/string_query.rb:12 + def initialize(string); end + + # Whether or not this string is a valid constant name. + # + # pkg:gem/prism#lib/prism/string_query.rb:22 + def constant?; end + + # Whether or not this string is a valid local variable name. + # + # pkg:gem/prism#lib/prism/string_query.rb:17 + def local?; end + + # Whether or not this string is a valid method name. + # + # pkg:gem/prism#lib/prism/string_query.rb:27 + def method_name?; end + + # The string that this query is wrapping. + # + # pkg:gem/prism#lib/prism/string_query.rb:9 + def string; end + + class << self + # Mirrors the C extension's StringQuery::constant? method. + # + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def constant?(string); end + + # Mirrors the C extension's StringQuery::local? method. + # + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def local?(string); end + + # Mirrors the C extension's StringQuery::method_name? method. + # + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def method_name?(string); end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead. +# +# pkg:gem/prism#lib/prism/node.rb:18293 +class Prism::SuperNode < ::Prism::Node + # Initialize a new SuperNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18440 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18308 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Can be only `nil` when there are empty parentheses, like `super()`. + # + # pkg:gem/prism#lib/prism/node.rb:18384 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # pkg:gem/prism#lib/prism/node.rb:18406 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18313 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18334 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18326 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode + # + # pkg:gem/prism#lib/prism/node.rb:18339 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, lparen_loc: self.lparen_loc, arguments: self.arguments, rparen_loc: self.rparen_loc, block: self.block); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18344 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # pkg:gem/prism#lib/prism/node.rb:18347 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18318 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18424 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:18409 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:18352 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18414 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18365 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18419 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18387 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18360 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18379 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18401 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18429 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18434 + def type; end + end +end + +# Flags for symbol nodes. +# +# pkg:gem/prism#lib/prism/node.rb:19945 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# pkg:gem/prism#lib/prism/node.rb:19950 +Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# pkg:gem/prism#lib/prism/node.rb:19953 +Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# pkg:gem/prism#lib/prism/node.rb:19947 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18457 +class Prism::SymbolNode < ::Prism::Node + # Initialize a new SymbolNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18459 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18616 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18471 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18476 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18595 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18563 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18492 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18487 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode + # + # pkg:gem/prism#lib/prism/node.rb:18497 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, value_loc: self.value_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18502 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } + # + # pkg:gem/prism#lib/prism/node.rb:18505 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18481 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18515 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18520 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:18510 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18600 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18585 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18525 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18577 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18539 + def save_opening_loc(repository); end + + # Save the value_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18558 + def save_value_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18605 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # pkg:gem/prism#lib/prism/node.rb:18582 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18590 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:18544 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18610 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# pkg:gem/prism#lib/prism/parse_result.rb:813 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # pkg:gem/prism#lib/prism/parse_result.rb:825 + sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } + def initialize(source, type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # pkg:gem/prism#lib/prism/parse_result.rb:860 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # pkg:gem/prism#lib/prism/parse_result.rb:833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Freeze this object and the objects it contains. + # + # pkg:gem/prism#lib/prism/parse_result.rb:873 + def deep_freeze; end + + # Returns a string representation of this token. + # + # pkg:gem/prism#lib/prism/parse_result.rb:867 + def inspect; end + + # A Location object representing the location of this token in the source. + # + # pkg:gem/prism#lib/prism/parse_result.rb:838 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # pkg:gem/prism#lib/prism/parse_result.rb:845 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The type of token that this token is. + # + # pkg:gem/prism#lib/prism/parse_result.rb:819 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # pkg:gem/prism#lib/prism/parse_result.rb:822 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # pkg:gem/prism#lib/prism/parse_result.rb:815 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# pkg:gem/prism#lib/prism/translation.rb:7 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# Note that this version of the parser always parses using the latest +# version of Ruby syntax supported by Prism. If you want specific version +# support, use one of the version-specific subclasses, such as +# `Prism::Translation::Parser34`. If you want to parse using the same +# version of Ruby syntax as the currently running version of Ruby, use +# `Prism::Translation::ParserCurrent`. +# +# pkg:gem/prism#lib/prism/translation/parser.rb:29 +class Prism::Translation::Parser < ::Parser::Base + # The `builder` argument is used to create the parser using our custom builder class by default. + # + # By using the `:parser` keyword argument, you can translate in a way that is compatible with + # the Parser gem using any parser. + # + # For example, in RuboCop for Ruby LSP, the following approach can be used to improve performance + # by reusing a pre-parsed `Prism::ParseLexResult`: + # + # class PrismPreparsed + # def initialize(prism_result) + # @prism_result = prism_result + # end + # + # def parse_lex(source, **options) + # @prism_result + # end + # end + # + # prism_preparsed = PrismPreparsed.new(prism_result) + # + # Prism::Translation::Ruby34.new(builder, parser: prism_preparsed) + # + # In an object passed to the `:parser` keyword argument, the `parse` and `parse_lex` methods + # should be implemented as needed. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:74 + def initialize(builder = T.unsafe(nil), parser: T.unsafe(nil)); end + + # The default encoding for Ruby files is UTF-8. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:91 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:99 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:112 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:129 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:155 + def try_declare_numparam(node); end + + # pkg:gem/prism#lib/prism/translation/parser.rb:86 + sig { overridable.returns(Integer) } + def version; end + + # pkg:gem/prism#lib/prism/translation/parser.rb:95 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:313 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:318 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:296 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:330 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:325 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:353 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:174 + def error_diagnostic(error, offset_cache); end + + # Options for how prism should parse/lex the source. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:339 + def prism_options; end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:274 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:163 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:169 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:247 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:7 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:8 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:14 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:15 + sig { override.returns(Integer) } + def version; end +end + +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:27 +Prism::Translation::Parser35 = Prism::Translation::Parser40 + +# This class is the entry-point for Ruby 4.0 of `Prism::Translation::Parser`. +# +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:21 +class Prism::Translation::Parser40 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:22 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 4.1 of `Prism::Translation::Parser`. +# +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:30 +class Prism::Translation::Parser41 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:31 + def version; end +end + +# A builder that knows how to convert more modern Ruby syntax +# into whitequark/parser gem's syntax tree. +# +# pkg:gem/prism#lib/prism/translation/parser/builder.rb:9 +class Prism::Translation::Parser::Builder < ::Parser::Builders::Default + # The following three lines have been added to support the `it` block parameter syntax in the source code below. + # + # if args.type == :itarg + # block_type = :itblock + # args = :it + # + # https://github.com/whitequark/parser/blob/v3.3.7.1/lib/parser/builders/default.rb#L1122-L1155 + # + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:22 + def block(method_call, begin_t, args, body, end_t); end + + # It represents the `it` block argument, which is not yet implemented in the Parser gem. + # + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:11 + def itarg; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:9 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:40 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:19 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:30 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:33 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:36 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:27 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:15 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:23 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:59 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:53 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:65 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:71 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:128 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:77 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:105 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:134 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:182 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:194 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:200 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:245 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:251 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:256 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:262 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:267 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:276 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:381 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:288 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:362 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:400 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:419 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:431 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:450 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:437 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:463 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:502 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:492 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:512 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:476 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:522 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:482 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:553 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:543 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:563 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:619 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:579 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:609 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:629 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:639 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:599 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:528 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:573 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:537 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:648 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:695 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:731 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:737 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:747 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:753 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:759 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:765 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1541 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:777 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:783 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:801 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:807 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:816 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:854 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:844 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:864 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:828 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:874 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:834 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:880 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:890 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:908 + def visit_if_node(node); end + + # 1i + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:950 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:956 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:962 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:968 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1016 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:998 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1034 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1052 + def visit_index_target_node(node); end + + # @foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1089 + def visit_instance_variable_and_write_node(node); end + + # @foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1079 + def visit_instance_variable_operator_write_node(node); end + + # @foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1099 + def visit_instance_variable_or_write_node(node); end + + # @foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1063 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1109 + def visit_instance_variable_target_node(node); end + + # @foo = 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1069 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1115 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1132 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1121 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1136 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1150 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1160 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1174 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1180 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1196 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1205 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1214 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1266 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1256 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1276 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1240 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1286 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1246 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1577 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1296 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1306 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1316 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1327 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1333 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1344 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1354 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1377 + def visit_next_node(node); end + + # nil + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1389 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1395 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1405 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1411 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1417 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1423 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1429 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1435 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1474 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1484 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1492 + def visit_pinned_variable_node(node); end + + # END {} + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1497 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1507 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1517 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1523 + def visit_range_node(node); end + + # 1r + # ^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1545 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1551 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1557 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1581 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1587 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1593 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1611 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1620 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1626 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1635 + def visit_return_node(node); end + + # self + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1647 + def visit_self_node(node); end + + # A shareable constant. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1652 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1658 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1670 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1676 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1682 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1694 + def visit_splat_node(node); end + + # A list of statements. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1707 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1713 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1738 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1761 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1788 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1794 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1803 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1833 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1859 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1877 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1903 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1929 + def visit_yield_node(node); end + + private + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1943 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1950 + def find_forwarding(node); end + + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1963 + def multi_target_elements(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1975 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1989 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2006 + def srange(location); end + + # Constructs a new source range from the given start and end offsets. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2011 + def srange_offsets(start_offset, end_offset); end + + # Constructs a new source range by finding a semicolon between the given + # start offset and end offset. If the semicolon is not found, it returns + # nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2021 + def srange_semicolon(start_offset, end_offset); end + + # When the content of a string node is split across multiple lines, the + # parser gem creates individual string nodes for each line the content is part of. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2138 + def string_nodes_from_interpolation(node, opening); end + + # Create parser string nodes from a single prism node. The parser gem + # "glues" strings together when a line continuation is encountered. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2150 + def string_nodes_from_line_continuations(unescaped, escaped, start_offset, opening); end + + # Transform a location into a token that the parser gem expects. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2029 + def token(location); end + + # Visit a block node on a call. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2034 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2069 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2115 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2127 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:11 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2003 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# pkg:gem/prism#lib/prism/translation/parser.rb:30 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:13 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:231 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:224 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:227 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:220 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:241 + def to_a; end + + private + + # Wonky heredoc tab/spaces rules. + # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L10548-L10558 + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:593 + def calculate_heredoc_whitespace(heredoc_token_index); end + + # Escape a byte value, given the control and meta flags. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:735 + def escape_build(value, control, meta); end + + # Read an escape out of the string scanner, given the control and meta + # flags, and push the unescaped value into the result. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:743 + def escape_read(result, scanner, control, meta); end + + # Determine if characters preceeded by a backslash should be escaped or not + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:804 + def interpolation?(quote); end + + # Parse a complex from the string representation. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:564 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:557 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:550 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:579 + def parse_rational(value); end + + # Determine if the string is part of a %-style array. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:814 + def percent_array?(quote); end + + # For %-arrays whitespace, the parser gem only considers whitespace before the newline. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:792 + def percent_array_leading_whitespace(string); end + + # In a percent array, certain whitespace can be preceeded with a backslash, + # causing the following characters to be part of the previous element. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:784 + def percent_array_unescape(string); end + + # Creates a new parser range, taking prisms byte offsets into account + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:545 + def range(start_offset, end_offset); end + + # Regexp allow interpolation but are handled differently during unescaping + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:809 + def regexp?(quote); end + + # Certain strings are merged into a single string token. + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:718 + def simplify_string?(value, quote); end + + # Wonky heredoc tab/spaces rules. + # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L16528-L16545 + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:640 + def trim_heredoc_whitespace(string, heredoc); end + + # Apply Ruby string escaping rules + # + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:675 + def unescape_string(string, quote); end +end + +# Types of tokens that are allowed to continue a method call with comments in-between. +# For these, the parser gem doesn't emit a newline token after the last comment. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:211 +Prism::Translation::Parser::Lexer::COMMENT_CONTINUATION_TYPES = T.let(T.unsafe(nil), Set) + +# When one of these delimiters is encountered, then the other +# one is allowed to be escaped as well. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:666 +Prism::Translation::Parser::Lexer::DELIMITER_SYMETRY = T.let(T.unsafe(nil), Hash) + +# Escape sequences that have special and should appear unescaped in the resulting string. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:657 +Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:193 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:194 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# Heredocs are complex and require us to keep track of a bit of info to refer to later +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 +class Prism::Translation::Parser::Lexer::HeredocData < ::Struct + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def common_whitespace; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def common_whitespace=(_); end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def identifier; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def identifier=(_); end + + class << self + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def [](*_arg0); end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def inspect; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def keyword_init?; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def members; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 + def new(*_arg0); end + end +end + +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:200 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Set) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:204 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Set) + +# https://github.com/whitequark/parser/blob/v3.3.6.0/lib/parser/lexer-strings.rl#L14 +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:671 +Prism::Translation::Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:237 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:19 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# These tokens are always skipped +# +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:15 +Prism::Translation::Parser::Lexer::TYPES_ALWAYS_SKIP = T.let(T.unsafe(nil), Set) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# pkg:gem/prism#lib/prism/translation/parser.rb:36 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:41 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # pkg:gem/prism#lib/prism/translation/parser.rb:38 + def message; end +end + +# pkg:gem/prism#lib/prism/translation/parser.rb:47 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/prism#lib/prism/translation/parser_current.rb:12 +Prism::Translation::ParserCurrent = Prism::Translation::Parser34 + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:42 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:482 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:479 + def column; end + + # True if the parser encountered an error during parsing. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:495 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:473 + def filename; end + + # The current line number of the parser. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:476 + def lineno; end + + # Parse the source and return the result. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:500 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:470 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:599 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:589 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:623 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:643 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:834 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:653 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:813 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:841 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:854 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:863 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:870 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:934 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:940 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:946 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:982 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:996 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1020 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1251 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1040 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1229 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1273 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1295 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1320 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1343 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1330 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1356 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1409 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1395 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1423 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1374 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1437 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1384 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1479 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1465 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1493 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1580 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1514 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1566 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1594 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1608 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1537 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1444 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1507 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1454 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1617 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1664 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1686 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1702 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1723 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1734 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1752 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1759 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1784 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1798 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1804 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1821 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1828 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1838 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1887 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1873 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1901 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1852 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1915 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1862 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1922 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1937 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1979 + def visit_if_node(node); end + + # 1i + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2015 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2021 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2026 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2033 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2068 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2051 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2085 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2102 + def visit_index_target_node(node); end + + # @foo &&= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2144 + def visit_instance_variable_and_write_node(node); end + + # @foo += bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2130 + def visit_instance_variable_operator_write_node(node); end + + # @foo ||= bar + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2158 + def visit_instance_variable_or_write_node(node); end + + # @foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2112 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2172 + def visit_instance_variable_target_node(node); end + + # @foo = 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2119 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2179 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2185 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2204 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2223 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2251 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2264 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2294 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2301 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2306 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2318 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2332 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2424 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2410 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2438 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2392 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2452 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2399 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2459 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2474 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2483 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2492 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2498 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2504 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2521 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2575 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2595 + def visit_next_node(node); end + + # nil + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2609 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2616 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2625 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2630 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2637 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2647 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2657 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2667 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2694 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2708 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2717 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2723 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2738 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2752 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2763 + def visit_range_node(node); end + + # 1r + # ^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2777 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2783 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2790 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2812 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2819 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2826 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2836 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2894 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2906 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2916 + def visit_return_node(node); end + + # self + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2930 + def visit_self_node(node); end + + # A shareable constant. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2936 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2942 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2952 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2959 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2966 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2979 + def visit_splat_node(node); end + + # A list of statements. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2984 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3001 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3133 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3154 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3178 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3185 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3197 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3225 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3249 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3270 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3294 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3317 + def visit_yield_node(node); end + + private + + # :stopdoc: + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3457 + def _dispatch_0; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3458 + def _dispatch_1(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3459 + def _dispatch_2(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3460 + def _dispatch_3(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3461 + def _dispatch_4(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3462 + def _dispatch_5(arg, _, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3463 + def _dispatch_7(arg, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3447 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1220 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3485 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3500 + def dedent_string(string, width); end + + # Extract the arguments and block Ripper-style, which means if the block + # is like `&b` then it's moved to arguments. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1184 + def get_arguments_and_block(arguments_node, block_node); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_BEGIN(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_CHAR(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_END(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on___end__(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_alias(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_alias_error(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aref(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aref_field(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_arg_ambiguous(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_arg_paren(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add_block(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add_star(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_forward; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_array(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aryptn(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assign(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assign_error(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoc_new(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoc_splat(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoclist_from_args(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_backref(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_backtick(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_bare_assoc_hash(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_begin(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_binary(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_block_var(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_blockarg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_bodystmt(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_brace_block(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_break(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_call(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_case(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_class(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_class_name_error(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_comma(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_command(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_command_call(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_comment(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_const(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_path_field(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_path_ref(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_ref(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_cvar(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_def(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_defined(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_defs(arg, _, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_do_block(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dot2(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dot3(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dyna_symbol(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_else(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_elsif(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embexpr_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embexpr_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embvar(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_ensure(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_excessed_comma; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_fcall(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_field(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_float(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_fndptn(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_for(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_gvar(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_hash(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_heredoc_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_heredoc_dedent(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_heredoc_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_hshptn(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ident(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_if(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_if_mod(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_ifop(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ignored_nl(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ignored_sp(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_imaginary(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_in(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_int(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ivar(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_kw(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_kwrest_param(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_label(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_label_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_lambda(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lbrace(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lbracket(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lparen(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_magic_comment(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_massign(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_method_add_arg(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_method_add_block(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add_post(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add_star(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_paren(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_module(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_add_star(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_new_from_args(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_next(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_nl(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_nokw_param(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_op(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_opassign(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_operator_ambiguous(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_param_error(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_params(arg, _, _, _, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_paren(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_parse_error(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_period(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_program(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qsymbols_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_qsymbols_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qsymbols_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qwords_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_qwords_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qwords_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rational(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rbrace(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rbracket(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_redo; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_regexp_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_regexp_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_regexp_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_regexp_literal(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_regexp_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rescue(arg, _, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rescue_mod(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rest_param(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_retry; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_return(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_return0; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rparen(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_sclass(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_semicolon(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_sp(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_stmts_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_stmts_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_concat(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_content; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_dvar(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_embexpr(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_literal(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_super(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_symbeg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbol(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbol_literal(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbols_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_symbols_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbols_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tlambda(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tlambeg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_top_const_field(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_top_const_ref(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_content(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_end(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unary(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_undef(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unless(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unless_mod(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_until(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_until_mod(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_alias(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_field(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_ref(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_vcall(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_void_stmt; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_when(arg, _, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_while(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_while_mod(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_word_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_word_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_words_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_words_beg(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_words_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_words_sep(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_xstring_add(arg, _); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_xstring_literal(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_xstring_new; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_yield(arg); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_yield0; end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3343 + def result; end + + # Returns true if there is a comma between the two locations. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3352 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:608 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:794 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:878 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:913 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1198 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1546 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2681 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3052 + def visit_heredoc_node(parts, base); end + + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3027 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3098 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3115 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2534 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3391 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:633 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2993 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:2283 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3364 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:783 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3409 + def visit_write_value(node); end + + # Returns true if there is a semicolon between the two locations. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3357 + def void_stmt?(left, right, allow_newline); end + + # This method is called when weak warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3476 + def warn(fmt, *args); end + + # This method is called when strong warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:3481 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:71 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:463 + def lex_state_name(state); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:45 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:393 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:428 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Tokenizes the Ruby program and returns an array of strings. + # The +filename+ and +lineno+ arguments are mostly ignored, since the + # return value is just the tokenized input. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # p Ripper.tokenize("def m(a) nil end") + # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:90 + def tokenize(*_arg0, **_arg1, &_arg2); end + end +end + +# A list of all of the Ruby binary operators. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:349 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:301 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:460 +Prism::Translation::Ripper::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:459 +Prism::Translation::Ripper::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_END = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:461 +Prism::Translation::Ripper::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:457 +Prism::Translation::Ripper::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:458 +Prism::Translation::Ripper::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper/filter.rb:6 +class Prism::Translation::Ripper::Filter + # :stopdoc: + # + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:8 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:23 + def column; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:15 + def filename; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:19 + def lineno; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:31 + def parse(init = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:27 + def state; end + + private + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:46 + def on_default(event, token, data); end +end + +# A list of all of the Ruby keywords. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:304 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# Ripper-internal bitflags. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:449 +Prism::Translation::Ripper::LEX_STATE_NAMES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:9 +class Prism::Translation::Ripper::Lexer < ::Prism::Translation::Ripper + # Pretty much just the same as Prism.lex_compat. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:111 + def lex(raise_errors: T.unsafe(nil)); end + + # Returns the lex_compat result wrapped in `Elem`. Errors are omitted. + # Since ripper is a streaming parser, tokens are expected to be emitted in the order + # that the parser encounters them. This is not implemented. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:118 + def parse(*_arg0, **_arg1, &_arg2); end + + # Similar to parse but ripper sorts the elements by position in the source. Also + # includes errors. Since prism does error recovery, in cases of syntax errors + # the result may differ greatly compared to ripper. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:127 + def scan(*_arg0, **_arg1, &_arg2); end +end + +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:50 +class Prism::Translation::Ripper::Lexer::Elem + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:53 + def initialize(pos, event, tok, state, message = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:61 + def [](index); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def event; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def event=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:78 + def inspect; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def message; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def message=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def pos; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def pos=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:84 + def pretty_print(q); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def state; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def state=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:101 + def to_a; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:82 + def to_s; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def tok; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def tok=(_arg0); end +end + +# :stopdoc: +# +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:11 +class Prism::Translation::Ripper::Lexer::State + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:15 + def initialize(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:36 + def &(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:35 + def ==(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:21 + def [](index); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:38 + def allbits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:39 + def anybits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:33 + def inspect; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:40 + def nobits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:34 + def pretty_print(q); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:32 + def to_i; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 + def to_int; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 + def to_s; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:37 + def |(i); end + + class << self + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:45 + def cached(i); end + end +end + +# Instances are frozen and there are only a handful of them so we cache them here. +# +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:43 +Prism::Translation::Ripper::Lexer::State::STATES = T.let(T.unsafe(nil), Hash) + +# This array contains name of parser events. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:295 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:96 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:298 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:239 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:11 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:14 + def error; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_BEGIN(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_CHAR(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_END(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on___end__(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_alias(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_alias_error(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_aref(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_aref_field(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_arg_ambiguous(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_arg_paren(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_args_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_args_add_block(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_args_add_star(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_args_forward(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_args_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_array(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_aryptn(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_assign(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_assign_error(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_assoc_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_assoc_splat(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_assoclist_from_args(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_backref(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_backtick(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_bare_assoc_hash(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_begin(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_binary(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_block_var(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_blockarg(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_bodystmt(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_brace_block(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_break(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_call(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_case(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_class(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_class_name_error(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_comma(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_command(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_command_call(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_comment(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_const(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_const_path_field(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_const_path_ref(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_const_ref(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_cvar(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_def(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_defined(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_defs(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_do_block(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_dot2(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_dot3(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_dyna_symbol(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_else(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_elsif(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embdoc(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embdoc_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embdoc_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embexpr_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embexpr_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_embvar(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_ensure(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_excessed_comma(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_fcall(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_field(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_float(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_fndptn(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_for(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_gvar(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_hash(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_heredoc_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_heredoc_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_hshptn(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_ident(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_if(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_if_mod(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_ifop(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_ignored_nl(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_ignored_sp(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_imaginary(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_in(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_int(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_ivar(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_kw(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_kwrest_param(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_label(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_label_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_lambda(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_lbrace(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_lbracket(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_lparen(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_magic_comment(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_massign(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_method_add_arg(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_method_add_block(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mlhs_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mlhs_add_post(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mlhs_add_star(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mlhs_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mlhs_paren(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_module(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mrhs_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mrhs_add_star(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mrhs_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_mrhs_new_from_args(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_next(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_nl(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_nokw_param(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_op(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_opassign(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_operator_ambiguous(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_param_error(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_params(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_paren(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_period(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_program(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_qsymbols_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_qsymbols_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_qsymbols_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_qwords_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_qwords_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_qwords_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_rational(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_rbrace(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_rbracket(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_redo(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_regexp_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_regexp_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_regexp_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_regexp_literal(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_regexp_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_rescue(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_rescue_mod(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_rest_param(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_retry(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_return(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_return0(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_rparen(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_sclass(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_semicolon(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_sp(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_stmts_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_stmts_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_concat(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_content(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_dvar(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_embexpr(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_string_literal(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_super(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_symbeg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_symbol(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_symbol_literal(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_symbols_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_symbols_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_symbols_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_tlambda(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_tlambeg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_top_const_field(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_top_const_ref(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_tstring_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_tstring_content(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_tstring_end(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_unary(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_undef(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_unless(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_unless_mod(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_until(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_until_mod(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_var_alias(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_var_field(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_var_ref(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_vcall(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_void_stmt(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_when(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_while(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_while_mod(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_word_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_word_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_words_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_words_beg(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_words_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 + def on_words_sep(tok); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_xstring_add(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_xstring_literal(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_xstring_new(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_yield(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_yield0(*args); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_zsuper(*args); end + + private + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:67 + def compile_error(mesg); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:18 + def dedent_element(e, width); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:62 + def on_error(mesg); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:25 + def on_heredoc_dedent(val, width); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:75 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:93 + def _dispatch_event_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:97 + def _dispatch_event_push(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_args_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_args_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:80 + def on_heredoc_dedent(val, width); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_mlhs_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:110 + def on_mlhs_add_post(list, post); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:106 + def on_mlhs_add_star(list, star); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_mlhs_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:102 + def on_mlhs_paren(list); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_mrhs_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_mrhs_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_qsymbols_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_qsymbols_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_qwords_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_qwords_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_regexp_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_regexp_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_stmts_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_stmts_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_string_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_symbols_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_symbols_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_word_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_word_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_words_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_words_new; end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 + def on_xstring_add(list, item); end + + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 + def on_xstring_new; end +end + +# This module is the entry-point for converting a prism syntax tree into the +# seattlerb/ruby_parser gem's syntax tree. +# +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:20 +class Prism::Translation::RubyParser + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1917 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1923 + def parse_file(filepath); end + + # Parse the give file and translate it into the + # seattlerb/ruby_parser gem's Sexp format. This method is + # provided for API compatibility to RubyParser and takes an + # optional +timeout+ argument. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1931 + def process(ruby, file = T.unsafe(nil), timeout = T.unsafe(nil)); end + + private + + # Translate the given parse result and filepath into the + # seattlerb/ruby_parser gem's Sexp format. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1953 + def translate(result, filepath); end + + class << self + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1938 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1944 + def parse_file(filepath); end + end +end + +# A prism visitor that builds Sexp objects. +# +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:22 +class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given file name. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:37 + def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # This is the name of the file that we are compiling. We set it on every + # Sexp object that is generated, and also use it to compile `__FILE__` + # nodes. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:26 + def file; end + + # Class variables will change their type based on if they are inside of + # a method definition or not, so we need to track that state. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:30 + def in_def; end + + # Some nodes will change their representation if they are inside of a + # pattern, so we need to track that state. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:34 + def in_pattern; end + + # ``` + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:55 + def visit_alias_global_variable_node(node); end + + # ``` + # alias foo bar + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:47 + def visit_alias_method_node(node); end + + # ``` + # foo => bar | baz + # ^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:63 + def visit_alternation_pattern_node(node); end + + # ``` + # a and b + # ^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:71 + def visit_and_node(node); end + + # ``` + # foo(bar) + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:128 + def visit_arguments_node(node); end + + # ``` + # [] + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:91 + def visit_array_node(node); end + + # ``` + # foo => [bar] + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:103 + def visit_array_pattern_node(node); end + + # ``` + # { a: 1 } + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:136 + def visit_assoc_node(node); end + + # ``` + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:147 + def visit_assoc_splat_node(node); end + + # ``` + # $+ + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:159 + def visit_back_reference_read_node(node); end + + # ``` + # begin end + # ^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:167 + def visit_begin_node(node); end + + # ``` + # foo(&bar) + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:202 + def visit_block_argument_node(node); end + + # ``` + # foo { |; bar| } + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:212 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:217 + def visit_block_node(node); end + + # ``` + # def foo(&bar); end + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:225 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:230 + def visit_block_parameters_node(node); end + + # ``` + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:272 + def visit_break_node(node); end + + # ``` + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:346 + def visit_call_and_write_node(node); end + + # ``` + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:292 + def visit_call_node(node); end + + # ``` + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:334 + def visit_call_operator_write_node(node); end + + # ``` + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:358 + def visit_call_or_write_node(node); end + + # ``` + # foo.bar, = 1 + # ^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:383 + def visit_call_target_node(node); end + + # ``` + # foo => bar => baz + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:391 + def visit_capture_pattern_node(node); end + + # ``` + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:407 + def visit_case_match_node(node); end + + # ``` + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:399 + def visit_case_node(node); end + + # ``` + # class Foo; end + # ^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:415 + def visit_class_node(node); end + + # ``` + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:468 + def visit_class_variable_and_write_node(node); end + + # ``` + # @@foo += bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:460 + def visit_class_variable_operator_write_node(node); end + + # ``` + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:476 + def visit_class_variable_or_write_node(node); end + + # ``` + # @@foo + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:441 + def visit_class_variable_read_node(node); end + + # ``` + # @@foo, = bar + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:484 + def visit_class_variable_target_node(node); end + + # ``` + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:452 + def visit_class_variable_write_node(node); end + + # ``` + # Foo &&= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:525 + def visit_constant_and_write_node(node); end + + # ``` + # Foo += bar + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:517 + def visit_constant_operator_write_node(node); end + + # ``` + # Foo ||= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:533 + def visit_constant_or_write_node(node); end + + # ``` + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:580 + def visit_constant_path_and_write_node(node); end + + # ``` + # Foo::Bar + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:549 + def visit_constant_path_node(node); end + + # ``` + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:572 + def visit_constant_path_operator_write_node(node); end + + # ``` + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:588 + def visit_constant_path_or_write_node(node); end + + # ``` + # Foo::Bar, = baz + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:596 + def visit_constant_path_target_node(node); end + + # ``` + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:564 + def visit_constant_path_write_node(node); end + + # ``` + # Foo + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:498 + def visit_constant_read_node(node); end + + # ``` + # Foo, = bar + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:541 + def visit_constant_target_node(node); end + + # ``` + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:509 + def visit_constant_write_node(node); end + + # ``` + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:614 + def visit_def_node(node); end + + # ``` + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:649 + def visit_defined_node(node); end + + # ``` + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:657 + def visit_else_node(node); end + + # ``` + # "foo #{bar}" + # ^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:665 + def visit_embedded_statements_node(node); end + + # ``` + # "foo #@bar" + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:675 + def visit_embedded_variable_node(node); end + + # ``` + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:683 + def visit_ensure_node(node); end + + # ``` + # false + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:691 + def visit_false_node(node); end + + # ``` + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:699 + def visit_find_pattern_node(node); end + + # ``` + # if foo .. bar; end + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:707 + def visit_flip_flop_node(node); end + + # ``` + # 1.0 + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:719 + def visit_float_node(node); end + + # ``` + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:727 + def visit_for_node(node); end + + # ``` + # def foo(...); bar(...); end + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:735 + def visit_forwarding_arguments_node(node); end + + # ``` + # def foo(...); end + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:743 + def visit_forwarding_parameter_node(node); end + + # ``` + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:754 + def visit_forwarding_super_node(node); end + + # ``` + # $foo &&= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:789 + def visit_global_variable_and_write_node(node); end + + # ``` + # $foo += bar + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:781 + def visit_global_variable_operator_write_node(node); end + + # ``` + # $foo ||= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:797 + def visit_global_variable_or_write_node(node); end + + # ``` + # $foo + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:762 + def visit_global_variable_read_node(node); end + + # ``` + # $foo, = bar + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:805 + def visit_global_variable_target_node(node); end + + # ``` + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:773 + def visit_global_variable_write_node(node); end + + # ``` + # {} + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:813 + def visit_hash_node(node); end + + # ``` + # foo => {} + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:821 + def visit_hash_pattern_node(node); end + + # ``` + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:844 + def visit_if_node(node); end + + # 1i + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:849 + def visit_imaginary_node(node); end + + # ``` + # { foo: } + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:857 + def visit_implicit_node(node); end + + # ``` + # foo { |bar,| } + # ^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:864 + def visit_implicit_rest_node(node); end + + # ``` + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:871 + def visit_in_node(node); end + + # ``` + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:901 + def visit_index_and_write_node(node); end + + # ``` + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:886 + def visit_index_operator_write_node(node); end + + # ``` + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:916 + def visit_index_or_write_node(node); end + + # ``` + # foo[bar], = 1 + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:931 + def visit_index_target_node(node); end + + # ``` + # @foo &&= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:969 + def visit_instance_variable_and_write_node(node); end + + # ``` + # @foo += bar + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:961 + def visit_instance_variable_operator_write_node(node); end + + # ``` + # @foo ||= bar + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:977 + def visit_instance_variable_or_write_node(node); end + + # ``` + # @foo + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:942 + def visit_instance_variable_read_node(node); end + + # ``` + # @foo, = bar + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:985 + def visit_instance_variable_target_node(node); end + + # ``` + # @foo = 1 + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:953 + def visit_instance_variable_write_node(node); end + + # ``` + # 1 + # ^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:993 + def visit_integer_node(node); end + + # ``` + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1001 + def visit_interpolated_match_last_line_node(node); end + + # ``` + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1020 + def visit_interpolated_regular_expression_node(node); end + + # ``` + # "foo #{bar}" + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1037 + def visit_interpolated_string_node(node); end + + # ``` + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1046 + def visit_interpolated_symbol_node(node); end + + # ``` + # `foo #{bar}` + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1055 + def visit_interpolated_x_string_node(node); end + + # ``` + # -> { it } + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1138 + def visit_it_local_variable_read_node(node); end + + # ``` + # foo(bar: baz) + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1146 + def visit_keyword_hash_node(node); end + + # ``` + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1157 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1162 + def visit_lambda_node(node); end + + # ``` + # foo &&= bar + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1213 + def visit_local_variable_and_write_node(node); end + + # ``` + # foo += bar + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1205 + def visit_local_variable_operator_write_node(node); end + + # ``` + # foo ||= bar + # ^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1221 + def visit_local_variable_or_write_node(node); end + + # ``` + # foo + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1182 + def visit_local_variable_read_node(node); end + + # ``` + # foo, = bar + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1229 + def visit_local_variable_target_node(node); end + + # ``` + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1197 + def visit_local_variable_write_node(node); end + + # ``` + # if /foo/ then end + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1237 + def visit_match_last_line_node(node); end + + # ``` + # foo in bar + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1245 + def visit_match_predicate_node(node); end + + # ``` + # foo => bar + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1253 + def visit_match_required_node(node); end + + # ``` + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1261 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1268 + def visit_missing_node(node); end + + # ``` + # module Foo; end + # ^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1276 + def visit_module_node(node); end + + # ``` + # foo, bar = baz + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1302 + def visit_multi_target_node(node); end + + # ``` + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1314 + def visit_multi_write_node(node); end + + # ``` + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1340 + def visit_next_node(node); end + + # ``` + # nil + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1355 + def visit_nil_node(node); end + + # ``` + # def foo(**nil); end + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1363 + def visit_no_keywords_parameter_node(node); end + + # ``` + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1371 + def visit_numbered_parameters_node(node); end + + # ``` + # $1 + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1379 + def visit_numbered_reference_read_node(node); end + + # ``` + # def foo(bar: baz); end + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1387 + def visit_optional_keyword_parameter_node(node); end + + # ``` + # def foo(bar = 1); end + # ^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1395 + def visit_optional_parameter_node(node); end + + # ``` + # a or b + # ^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1403 + def visit_or_node(node); end + + # ``` + # def foo(bar, *baz); end + # ^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1423 + def visit_parameters_node(node); end + + # ``` + # () + # ^^ + # + # (1) + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1465 + def visit_parentheses_node(node); end + + # ``` + # foo => ^(bar) + # ^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1477 + def visit_pinned_expression_node(node); end + + # ``` + # foo = 1 and bar => ^foo + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1485 + def visit_pinned_variable_node(node); end + + # END {} + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1494 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1499 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1504 + def visit_program_node(node); end + + # ``` + # 0..5 + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1512 + def visit_range_node(node); end + + # ``` + # 1r + # ^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1536 + def visit_rational_node(node); end + + # ``` + # redo + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1544 + def visit_redo_node(node); end + + # ``` + # /foo/ + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1552 + def visit_regular_expression_node(node); end + + # ``` + # def foo(bar:); end + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1560 + def visit_required_keyword_parameter_node(node); end + + # ``` + # def foo(bar); end + # ^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1568 + def visit_required_parameter_node(node); end + + # ``` + # foo rescue bar + # ^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1576 + def visit_rescue_modifier_node(node); end + + # ``` + # begin; rescue; end + # ^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1584 + def visit_rescue_node(node); end + + # ``` + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1606 + def visit_rest_parameter_node(node); end + + # ``` + # retry + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1614 + def visit_retry_node(node); end + + # ``` + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1625 + def visit_return_node(node); end + + # ``` + # self + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1640 + def visit_self_node(node); end + + # A shareable constant. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1645 + def visit_shareable_constant_node(node); end + + # ``` + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1653 + def visit_singleton_class_node(node); end + + # ``` + # __ENCODING__ + # ^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1663 + def visit_source_encoding_node(node); end + + # ``` + # __FILE__ + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1672 + def visit_source_file_node(node); end + + # ``` + # __LINE__ + # ^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1680 + def visit_source_line_node(node); end + + # ``` + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1694 + def visit_splat_node(node); end + + # A list of statements. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1703 + def visit_statements_node(node); end + + # ``` + # "foo" + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1717 + def visit_string_node(node); end + + # ``` + # super(foo) + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1732 + def visit_super_node(node); end + + # ``` + # :foo + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1748 + def visit_symbol_node(node); end + + # ``` + # true + # ^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1756 + def visit_true_node(node); end + + # ``` + # undef foo + # ^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1764 + def visit_undef_node(node); end + + # ``` + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1776 + def visit_unless_node(node); end + + # ``` + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1787 + def visit_until_node(node); end + + # ``` + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1795 + def visit_when_node(node); end + + # ``` + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1806 + def visit_while_node(node); end + + # ``` + # `foo` + # ^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1814 + def visit_x_string_node(node); end + + # ``` + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1832 + def visit_yield_node(node); end + + private + + # Attach prism comments to the given sexp. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1839 + def attach_comments(sexp, node); end + + # If a class variable is written within a method definition, it has a + # different type than everywhere else. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:490 + def class_variable_write_type; end + + # Create a new compiler with the given options. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1850 + def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # Call nodes with operators following them will either be op_asgn or + # op_asgn2 nodes. That is determined by their call operator and their + # right-hand side. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:369 + def op_asgn?(node); end + + # Call nodes with operators following them can use &. as an operator, + # which changes their type by prefixing "safe_". + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:375 + def op_asgn_type(node, type); end + + # Create a new Sexp object from the given prism node and arguments. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1855 + def s(node, *arguments); end + + # Visit a block node, which will modify the AST by wrapping the given + # visited node in an iter node. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1865 + def visit_block(node, sexp, block); end + + # ``` + # def foo((bar, baz)); end + # ^^^^^^^^^^ + # ``` + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1440 + def visit_destructured_parameter(node); end + + # Visit the interpolated content of the string-like node. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1062 + def visit_interpolated_parts(parts); end + + # Pattern constants get wrapped in another layer of :const. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1886 + def visit_pattern_constant(node); end + + # If the bounds of a range node are empty parentheses, then they do not + # get replaced by their usual s(:nil), but instead are s(:begin). + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1524 + def visit_range_bounds_node(node); end + + # Visit the value of a write, which will be on the right-hand side of + # a write operator. Because implicit arrays can have splats, those could + # potentially be wrapped in an svalue node. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1900 + def visit_write_value(node); end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18630 +class Prism::TrueNode < ::Prism::Node + # Initialize a new TrueNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18632 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18695 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18640 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18645 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18661 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18656 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode + # + # pkg:gem/prism#lib/prism/node.rb:18666 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18671 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # pkg:gem/prism#lib/prism/node.rb:18674 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18650 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18679 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18684 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18689 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18704 +class Prism::UndefNode < ::Prism::Node + # Initialize a new UndefNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18706 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, names, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18793 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18716 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18721 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18738 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18733 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode + # + # pkg:gem/prism#lib/prism/node.rb:18743 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, names: self.names, keyword_loc: self.keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } + # + # pkg:gem/prism#lib/prism/node.rb:18751 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18726 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18777 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:18772 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:18759 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # pkg:gem/prism#lib/prism/node.rb:18756 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18767 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18782 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18787 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:18808 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # pkg:gem/prism#lib/prism/node.rb:18810 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:18986 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:18824 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18829 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:18852 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:18843 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the else clause of the unless node. This method is deprecated in + # favor of #else_clause. + # + # pkg:gem/prism#lib/prism/node_ext.rb:506 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode + # + # pkg:gem/prism#lib/prism/node.rb:18857 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, predicate: self.predicate, then_keyword_loc: self.then_keyword_loc, statements: self.statements, else_clause: self.else_clause, end_keyword_loc: self.end_keyword_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:18862 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:18865 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18834 + def each_child_node; end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18930 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18965 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18936 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:18970 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:18955 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18876 + sig { returns(Prism::Location) } + def keyword_loc; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:98 + def newline_flag!(lines); end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18895 + sig { returns(Prism::Node) } + def predicate; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18950 + def save_end_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18884 + def save_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:18915 + def save_then_keyword_loc(repository); end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18924 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:18960 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # + # unless cond then bar end + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:18901 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:18975 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:18980 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:19004 +class Prism::UntilNode < ::Prism::Node + # Initialize a new UntilNode node. + # + # pkg:gem/prism#lib/prism/node.rb:19006 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:19156 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:19019 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:19063 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19024 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19135 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19100 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:19045 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:19037 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode + # + # pkg:gem/prism#lib/prism/node.rb:19050 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, do_keyword_loc: self.do_keyword_loc, closing_loc: self.closing_loc, predicate: self.predicate, statements: self.statements); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # pkg:gem/prism#lib/prism/node.rb:19058 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19130 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19081 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19029 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:19140 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19125 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19068 + sig { returns(Prism::Location) } + def keyword_loc; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:104 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:19119 + sig { returns(Prism::Node) } + def predicate; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19114 + def save_closing_loc(repository); end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19095 + def save_do_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19076 + def save_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:19122 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:19145 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:19150 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == :foo +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# pkg:gem/prism#lib/prism/visitor.rb:57 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:59 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:64 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:69 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:74 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:79 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:84 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:89 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:94 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:99 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:104 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:109 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:114 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:119 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:124 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:129 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:134 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:139 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:144 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:149 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:154 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:159 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:164 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:169 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:174 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:179 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:184 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:189 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:194 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:199 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:204 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:209 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:214 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:219 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:224 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:229 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:234 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:239 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:244 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:249 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:254 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:259 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:264 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:269 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:274 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:279 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:284 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:289 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:294 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:299 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:304 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:309 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:314 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:319 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:324 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:329 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:334 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:339 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:344 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:349 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:354 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:359 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:364 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:369 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:374 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:379 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:384 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:389 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:394 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:399 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:404 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:409 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:414 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:419 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:424 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:429 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:434 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:439 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:444 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:449 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:454 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:459 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:464 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:469 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:474 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:479 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:484 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:489 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:494 + sig { params(node: Prism::ItLocalVariableReadNode).void } + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:499 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:504 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:509 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:514 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:519 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:524 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:529 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:534 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:539 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:544 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:549 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:554 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:559 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:564 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:569 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:574 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:579 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:584 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:589 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:594 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:599 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:604 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:609 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:614 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:619 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:624 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:629 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:634 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:639 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:644 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:649 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:654 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:659 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:664 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:669 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:674 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:679 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:684 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:689 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:694 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:699 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:704 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:709 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:714 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:719 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:724 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:729 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:734 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:739 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:744 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:749 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:754 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:759 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:764 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:769 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:774 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:779 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:784 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:789 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:794 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:799 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:804 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # pkg:gem/prism#lib/prism/visitor.rb:809 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# pkg:gem/prism#lib/prism/node.rb:19173 +class Prism::WhenNode < ::Prism::Node + # Initialize a new WhenNode node. + # + # pkg:gem/prism#lib/prism/node.rb:19175 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:19295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:19187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:19213 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:19205 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19244 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode + # + # pkg:gem/prism#lib/prism/node.rb:19218 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, conditions: self.conditions, then_keyword_loc: self.then_keyword_loc, statements: self.statements); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19223 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } + # + # pkg:gem/prism#lib/prism/node.rb:19226 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19197 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:19279 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19269 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19231 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19239 + def save_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19261 + def save_then_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:19266 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19274 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19247 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:19284 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:19289 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:19312 +class Prism::WhileNode < ::Prism::Node + # Initialize a new WhileNode node. + # + # pkg:gem/prism#lib/prism/node.rb:19314 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:19464 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:19327 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:19371 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19443 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19408 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:19353 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:19345 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode + # + # pkg:gem/prism#lib/prism/node.rb:19358 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, do_keyword_loc: self.do_keyword_loc, closing_loc: self.closing_loc, predicate: self.predicate, statements: self.statements); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19363 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # pkg:gem/prism#lib/prism/node.rb:19366 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19438 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19389 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19337 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:19448 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19433 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19376 + sig { returns(Prism::Location) } + def keyword_loc; end + + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:110 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # pkg:gem/prism#lib/prism/node.rb:19427 + sig { returns(Prism::Node) } + def predicate; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19422 + def save_closing_loc(repository); end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19403 + def save_do_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19384 + def save_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # pkg:gem/prism#lib/prism/node.rb:19430 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:19453 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:19458 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:19479 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new XStringNode node. + # + # pkg:gem/prism#lib/prism/node.rb:19481 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:19615 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:19493 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19498 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19594 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19568 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:19514 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:19509 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19589 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19555 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + # + # pkg:gem/prism#lib/prism/node.rb:19519 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19524 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # pkg:gem/prism#lib/prism/node.rb:19527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19503 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:19537 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # pkg:gem/prism#lib/prism/node.rb:19532 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:19599 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19584 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19542 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19576 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19563 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19550 + def save_opening_loc(repository); end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # pkg:gem/prism#lib/prism/node_ext.rb:93 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:19604 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # pkg:gem/prism#lib/prism/node.rb:19581 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:19609 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:19629 +class Prism::YieldNode < ::Prism::Node + # Initialize a new YieldNode node. + # + # pkg:gem/prism#lib/prism/node.rb:19631 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # pkg:gem/prism#lib/prism/node.rb:19770 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # pkg:gem/prism#lib/prism/node.rb:19643 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # pkg:gem/prism#lib/prism/node.rb:19717 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19648 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # pkg:gem/prism#lib/prism/node.rb:19667 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # pkg:gem/prism#lib/prism/node.rb:19660 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode + # + # pkg:gem/prism#lib/prism/node.rb:19672 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, lparen_loc: self.lparen_loc, arguments: self.arguments, rparen_loc: self.rparen_loc); end + + # def deconstruct: () -> Array[Node?] + # + # pkg:gem/prism#lib/prism/node.rb:19677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } + # + # pkg:gem/prism#lib/prism/node.rb:19680 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19653 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # pkg:gem/prism#lib/prism/node.rb:19754 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # pkg:gem/prism#lib/prism/node.rb:19739 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # pkg:gem/prism#lib/prism/node.rb:19685 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19744 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19698 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:19749 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # pkg:gem/prism#lib/prism/node.rb:19720 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19693 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19712 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:19734 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # pkg:gem/prism#lib/prism/node.rb:19759 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # pkg:gem/prism#lib/prism/node.rb:19764 + def type; end + end +end + +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:11 +class RubyParser; end + +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:12 +class RubyParser::SyntaxError < ::RuntimeError; end diff --git a/sorbet/rbi/gems/pry@0.14.1.rbi b/sorbet/rbi/gems/pry@0.14.1.rbi deleted file mode 100644 index d8a3c3f6..00000000 --- a/sorbet/rbi/gems/pry@0.14.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry` gem. -# Please instead update this file by running `bin/tapioca gem pry`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires diff --git a/sorbet/rbi/gems/racc@1.8.1.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi new file mode 100644 index 00000000..57ffe0d5 --- /dev/null +++ b/sorbet/rbi/gems/racc@1.8.1.rbi @@ -0,0 +1,165 @@ +# 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`. + + +# pkg:gem/racc#lib/racc/parser.rb:19 +ParseError = Racc::ParseError + +# pkg:gem/racc#lib/racc/info.rb:17 +Racc::Copyright = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/parser.rb:195 +class Racc::CparseParams; end + +# pkg:gem/racc#lib/racc/parser.rb:184 +class Racc::Parser + # pkg:gem/racc#lib/racc/parser.rb:279 + def _racc_do_parse_rb(arg, in_debug); end + + # pkg:gem/racc#lib/racc/parser.rb:479 + def _racc_do_reduce(arg, act); end + + # common + # + # pkg:gem/racc#lib/racc/parser.rb:382 + def _racc_evalact(act, arg); end + + # pkg:gem/racc#lib/racc/parser.rb:232 + def _racc_init_sysvars; end + + # pkg:gem/racc#lib/racc/parser.rb:220 + def _racc_setup; end + + # pkg:gem/racc#lib/racc/parser.rb:329 + def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # pkg:gem/racc#lib/racc/parser.rb:261 + 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. + # + # pkg:gem/racc#lib/racc/parser.rb:275 + def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # pkg:gem/racc#lib/racc/parser.rb:535 + def on_error(t, val, vstack); end + + # pkg:gem/racc#lib/racc/parser.rb:584 + def racc_accept; end + + # pkg:gem/racc#lib/racc/parser.rb:589 + def racc_e_pop(state, tstack, vstack); end + + # pkg:gem/racc#lib/racc/parser.rb:596 + def racc_next_state(curstate, state); end + + # pkg:gem/racc#lib/racc/parser.rb:602 + def racc_print_stacks(t, v); end + + # pkg:gem/racc#lib/racc/parser.rb:611 + def racc_print_states(s); end + + # For debugging output + # + # pkg:gem/racc#lib/racc/parser.rb:558 + def racc_read_token(t, tok, val); end + + # pkg:gem/racc#lib/racc/parser.rb:571 + def racc_reduce(toks, sim, tstack, vstack); end + + # pkg:gem/racc#lib/racc/parser.rb:565 + def racc_shift(tok, tstack, vstack); end + + # pkg:gem/racc#lib/racc/parser.rb:618 + def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # pkg:gem/racc#lib/racc/parser.rb:624 + def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # pkg:gem/racc#lib/racc/parser.rb:548 + def yyaccept; end + + # Leave error recovering mode. + # + # pkg:gem/racc#lib/racc/parser.rb:553 + def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # pkg:gem/racc#lib/racc/parser.rb:542 + def yyerror; end + + # pkg:gem/racc#lib/racc/parser.rb:323 + def yyparse(recv, mid); end + + private + + # pkg:gem/racc#lib/racc/parser.rb:195 + def _racc_do_parse_c(_arg0, _arg1); end + + # pkg:gem/racc#lib/racc/parser.rb:195 + def _racc_yyparse_c(_arg0, _arg1, _arg2, _arg3); end + + class << self + # pkg:gem/racc#lib/racc/parser.rb:216 + def racc_runtime_type; end + end +end + +# pkg:gem/racc#lib/racc/parser.rb:205 +Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/racc#lib/racc/parser.rb:207 +Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/parser.rb:187 +Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/parser.rb:208 +Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/parser.rb:186 +Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/parser.rb:206 +Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/racc#lib/racc/parser.rb:181 +Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/racc#lib/racc/info.rb:15 +Racc::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/racc#lib/racc/info.rb:16 +Racc::Version = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.0.6.rbi deleted file mode 100644 index 2024cc4a..00000000 --- a/sorbet/rbi/gems/rake@13.0.6.rbi +++ /dev/null @@ -1,805 +0,0 @@ -# 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`. - -FileList = Rake::FileList - -module FileUtils - include ::FileUtils::StreamUtils_ - extend ::FileUtils::StreamUtils_ - - def ruby(*args, **options, &block); end - def safe_ln(*args, **options); end - def sh(*cmd, &block); end - def split_all(path); end - - private - - def create_shell_runner(cmd); end - def set_verbose_option(options); end - def sh_show_command(cmd); end -end - -FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) -FileUtils::RUBY = T.let(T.unsafe(nil), String) - -class Module - def rake_extension(method); end -end - -module Rake - extend ::FileUtils::StreamUtils_ - extend ::FileUtils - extend ::Rake::FileUtilsExt - - class << self - def add_rakelib(*files); end - def application; end - def application=(app); end - def each_dir_parent(dir); end - def from_pathname(path); end - def load_rakefile(path); end - def original_dir; end - def suggested_thread_count; end - def with_application(block_application = T.unsafe(nil)); end - end -end - -class Rake::Application - include ::Rake::TaskManager - include ::Rake::TraceOutput - - def initialize; end - - def add_import(fn); end - def add_loader(ext, loader); end - def collect_command_line_tasks(args); end - def default_task_name; end - def deprecate(old_usage, new_usage, call_site); end - def display_cause_details(ex); end - def display_error_message(ex); end - def display_exception_backtrace(ex); end - def display_exception_details(ex); end - def display_exception_details_seen; end - def display_exception_message_details(ex); end - def display_prerequisites; end - def display_tasks_and_comments; end - def dynamic_width; end - def dynamic_width_stty; end - def dynamic_width_tput; end - def exit_because_of_exception(ex); end - def find_rakefile_location; end - def handle_options(argv); end - def has_cause?(ex); end - def have_rakefile; end - def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end - def invoke_task(task_string); end - def load_imports; end - def load_rakefile; end - def name; end - def options; end - def original_dir; end - def parse_task_string(string); end - def print_rakefile_directory(location); end - def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end - def rakefile; end - def rakefile_location(backtrace = T.unsafe(nil)); end - def raw_load_rakefile; end - def run(argv = T.unsafe(nil)); end - def run_with_threads; end - def set_default_options; end - def standard_exception_handling; end - def standard_rake_options; end - def system_dir; end - def terminal_columns; end - def terminal_columns=(_arg0); end - def terminal_width; end - def thread_pool; end - def top_level; end - def top_level_tasks; end - def trace(*strings); end - def truncate(string, width); end - def truncate_output?; end - def tty_output=(_arg0); end - def tty_output?; end - def unix?; end - def windows?; end - - private - - def glob(path, &block); end - def has_chain?(exception); end - def select_tasks_to_show(options, show_tasks, value); end - def select_trace_output(options, trace_option, value); end - def sort_options(options); end - def standard_system_dir; end -end - -Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) - -module Rake::Backtrace - class << self - def collapse(backtrace); end - end -end - -Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) -Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) -Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) -Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) - -module Rake::Cloneable - private - - def initialize_copy(source); end -end - -class Rake::CommandLineOptionError < ::StandardError; end - -class Rake::CpuCounter - def count; end - def count_with_default(default = T.unsafe(nil)); end - - class << self - def count; end - end -end - -module Rake::DSL - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - - private - - def desc(description); end - def directory(*args, &block); end - def file(*args, &block); end - def file_create(*args, &block); end - def import(*fns); end - def multitask(*args, &block); end - def namespace(name = T.unsafe(nil), &block); end - def rule(*args, &block); end - def task(*args, &block); end -end - -class Rake::DefaultLoader - def load(fn); end -end - -Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) -Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) - -class Rake::EarlyTime - include ::Comparable - include ::Singleton - extend ::Singleton::SingletonClassMethods - - def <=>(other); end - def to_s; end -end - -class Rake::FileCreationTask < ::Rake::FileTask - def needed?; end - def timestamp; end -end - -class Rake::FileList - include ::Rake::Cloneable - - def initialize(*patterns); end - - def &(*args, &block); end - def *(other); end - def +(*args, &block); end - def -(*args, &block); end - def <<(obj); end - def <=>(*args, &block); end - def ==(array); end - def [](*args, &block); end - def []=(*args, &block); end - def add(*filenames); end - def all?(*args, &block); end - def any?(*args, &block); end - def append(*args, &block); end - def assoc(*args, &block); end - def at(*args, &block); end - def bsearch(*args, &block); end - def bsearch_index(*args, &block); end - def chain(*args, &block); end - def chunk(*args, &block); end - def chunk_while(*args, &block); end - def clear(*args, &block); end - def clear_exclude; end - def collect(*args, &block); end - def collect!(*args, &block); end - def collect_concat(*args, &block); end - def combination(*args, &block); end - def compact(*args, &block); end - def compact!(*args, &block); end - def concat(*args, &block); end - def count(*args, &block); end - def cycle(*args, &block); end - def deconstruct(*args, &block); end - def delete(*args, &block); end - def delete_at(*args, &block); end - def delete_if(*args, &block); end - def detect(*args, &block); end - def difference(*args, &block); end - def dig(*args, &block); end - def drop(*args, &block); end - def drop_while(*args, &block); end - def each(*args, &block); end - def each_cons(*args, &block); end - def each_entry(*args, &block); end - def each_index(*args, &block); end - def each_slice(*args, &block); end - def each_with_index(*args, &block); end - def each_with_object(*args, &block); end - def egrep(pattern, *options); end - def empty?(*args, &block); end - def entries(*args, &block); end - def exclude(*patterns, &block); end - def excluded_from_list?(fn); end - def existing; end - def existing!; end - def ext(newext = T.unsafe(nil)); end - def fetch(*args, &block); end - def fill(*args, &block); end - def filter(*args, &block); end - def filter!(*args, &block); end - def filter_map(*args, &block); end - def find(*args, &block); end - def find_all(*args, &block); end - def find_index(*args, &block); end - def first(*args, &block); end - def flat_map(*args, &block); end - def flatten(*args, &block); end - def flatten!(*args, &block); end - def grep(*args, &block); end - def grep_v(*args, &block); end - def group_by(*args, &block); end - def gsub(pat, rep); end - def gsub!(pat, rep); end - def import(array); end - def include(*filenames); end - def include?(*args, &block); end - def index(*args, &block); end - def inject(*args, &block); end - def insert(*args, &block); end - def inspect(*args, &block); end - def intersect?(*args, &block); end - def intersection(*args, &block); end - def is_a?(klass); end - def join(*args, &block); end - def keep_if(*args, &block); end - def kind_of?(klass); end - def last(*args, &block); end - def lazy(*args, &block); end - def length(*args, &block); end - def map(*args, &block); end - def map!(*args, &block); end - def max(*args, &block); end - def max_by(*args, &block); end - def member?(*args, &block); end - def min(*args, &block); end - def min_by(*args, &block); end - def minmax(*args, &block); end - def minmax_by(*args, &block); end - def none?(*args, &block); end - def one?(*args, &block); end - def pack(*args, &block); end - def partition(&block); end - def pathmap(spec = T.unsafe(nil), &block); end - def permutation(*args, &block); end - def place(*args, &block); end - def pop(*args, &block); end - def prepend(*args, &block); end - def product(*args, &block); end - def push(*args, &block); end - def rassoc(*args, &block); end - def reduce(*args, &block); end - def reject(*args, &block); end - def reject!(*args, &block); end - def repeated_combination(*args, &block); end - def repeated_permutation(*args, &block); end - def replace(*args, &block); end - def resolve; end - def reverse(*args, &block); end - def reverse!(*args, &block); end - def reverse_each(*args, &block); end - def rindex(*args, &block); end - def rotate(*args, &block); end - def rotate!(*args, &block); end - def sample(*args, &block); end - def select(*args, &block); end - def select!(*args, &block); end - def shelljoin(*args, &block); end - def shift(*args, &block); end - def shuffle(*args, &block); end - def shuffle!(*args, &block); end - def size(*args, &block); end - def slice(*args, &block); end - def slice!(*args, &block); end - def slice_after(*args, &block); end - def slice_before(*args, &block); end - def slice_when(*args, &block); end - def sort(*args, &block); end - def sort!(*args, &block); end - def sort_by(*args, &block); end - def sort_by!(*args, &block); end - def sub(pat, rep); end - def sub!(pat, rep); end - def sum(*args, &block); end - def take(*args, &block); end - def take_while(*args, &block); end - def tally(*args, &block); end - def to_a; end - def to_ary; end - def to_h(*args, &block); end - def to_s; end - def to_set(*args, &block); end - def transpose(*args, &block); end - def union(*args, &block); end - def uniq(*args, &block); end - def uniq!(*args, &block); end - def unshift(*args, &block); end - def values_at(*args, &block); end - def zip(*args, &block); end - def |(*args, &block); end - - private - - def add_matching(pattern); end - def resolve_add(fn); end - def resolve_exclude; end - - class << self - def [](*args); end - def glob(pattern, *args); end - end -end - -Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) -Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) -Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) -Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) -Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) -Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) -Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) -Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) - -class Rake::FileTask < ::Rake::Task - def needed?; end - def timestamp; end - - private - - def out_of_date?(stamp); end - - class << self - def scope_name(scope, task_name); end - end -end - -module Rake::FileUtilsExt - include ::FileUtils::StreamUtils_ - include ::FileUtils - extend ::FileUtils::StreamUtils_ - extend ::FileUtils - extend ::Rake::FileUtilsExt - - def cd(*args, **options, &block); end - def chdir(*args, **options, &block); end - def chmod(*args, **options, &block); end - def chmod_R(*args, **options, &block); end - def chown(*args, **options, &block); end - def chown_R(*args, **options, &block); end - def copy(*args, **options, &block); end - def cp(*args, **options, &block); end - def cp_lr(*args, **options, &block); end - def cp_r(*args, **options, &block); end - def install(*args, **options, &block); end - def link(*args, **options, &block); end - def ln(*args, **options, &block); end - def ln_s(*args, **options, &block); end - def ln_sf(*args, **options, &block); end - def makedirs(*args, **options, &block); end - def mkdir(*args, **options, &block); end - def mkdir_p(*args, **options, &block); end - def mkpath(*args, **options, &block); end - def move(*args, **options, &block); end - def mv(*args, **options, &block); end - def nowrite(value = T.unsafe(nil)); end - def rake_check_options(options, *optdecl); end - def rake_output_message(message); end - def remove(*args, **options, &block); end - def rm(*args, **options, &block); end - def rm_f(*args, **options, &block); end - def rm_r(*args, **options, &block); end - def rm_rf(*args, **options, &block); end - def rmdir(*args, **options, &block); end - def rmtree(*args, **options, &block); end - def safe_unlink(*args, **options, &block); end - def symlink(*args, **options, &block); end - def touch(*args, **options, &block); end - def verbose(value = T.unsafe(nil)); end - def when_writing(msg = T.unsafe(nil)); end - - class << self - def nowrite_flag; end - def nowrite_flag=(_arg0); end - def verbose_flag; end - def verbose_flag=(_arg0); end - end -end - -Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) - -class Rake::InvocationChain < ::Rake::LinkedList - def append(invocation); end - def member?(invocation); end - def to_s; end - - private - - def prefix; end - - class << self - def append(invocation, chain); end - end -end - -Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) - -class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList - def append(invocation); end - def member?(obj); end - def to_s; end -end - -module Rake::InvocationExceptionMixin - def chain; end - def chain=(value); end -end - -Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) - -class Rake::LateTime - include ::Comparable - include ::Singleton - extend ::Singleton::SingletonClassMethods - - def <=>(other); end - def to_s; end -end - -class Rake::LinkedList - include ::Enumerable - - def initialize(head, tail = T.unsafe(nil)); end - - def ==(other); end - def conj(item); end - def each; end - def empty?; end - def head; end - def inspect; end - def tail; end - def to_s; end - - class << self - def cons(head, tail); end - def empty; end - def make(*args); end - end -end - -Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) - -class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList - def initialize; end - - def empty?; end - - class << self - def cons(head, tail); end - end -end - -class Rake::MultiTask < ::Rake::Task - private - - def invoke_prerequisites(task_args, invocation_chain); end -end - -class Rake::NameSpace - def initialize(task_manager, scope_list); end - - def [](name); end - def scope; end - def tasks; end -end - -module Rake::PrivateReader - mixes_in_class_methods ::Rake::PrivateReader::ClassMethods - - class << self - def included(base); end - end -end - -module Rake::PrivateReader::ClassMethods - def private_reader(*names); end -end - -class Rake::Promise - def initialize(args, &block); end - - def recorder; end - def recorder=(_arg0); end - def value; end - def work; end - - private - - def chore; end - def complete?; end - def discard; end - def error?; end - def result?; end - def stat(*args); end -end - -Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) - -class Rake::PseudoStatus - def initialize(code = T.unsafe(nil)); end - - def >>(n); end - def exited?; end - def exitstatus; end - def stopped?; end - def to_i; end -end - -class Rake::RuleRecursionOverflowError < ::StandardError - def initialize(*args); end - - def add_target(target); end - def message; end -end - -class Rake::Scope < ::Rake::LinkedList - def path; end - def path_with_task_name(task_name); end - def trim(n); end -end - -Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) - -class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList - def path; end - def path_with_task_name(task_name); end -end - -class Rake::Task - def initialize(task_name, app); end - - def actions; end - def add_description(description); end - def all_prerequisite_tasks; end - def already_invoked; end - def application; end - def application=(_arg0); end - def arg_description; end - def arg_names; end - def clear; end - def clear_actions; end - def clear_args; end - def clear_comments; end - def clear_prerequisites; end - def comment; end - def comment=(comment); end - def enhance(deps = T.unsafe(nil), &block); end - def execute(args = T.unsafe(nil)); end - def full_comment; end - def inspect; end - def investigation; end - def invoke(*args); end - def invoke_prerequisites(task_args, invocation_chain); end - def invoke_prerequisites_concurrently(task_args, invocation_chain); end - def locations; end - def name; end - def name_with_args; end - def needed?; end - def order_only_prerequisites; end - def prereqs; end - def prerequisite_tasks; end - def prerequisites; end - def reenable; end - def scope; end - def set_arg_names(args); end - def source; end - def sources; end - def sources=(_arg0); end - def timestamp; end - def to_s; end - def |(deps); end - - protected - - def collect_prerequisites(seen); end - def invoke_with_call_chain(task_args, invocation_chain); end - - private - - def add_chain_to(exception, new_chain); end - def add_comment(comment); end - def first_sentence(string); end - def format_trace_flags; end - def lookup_prerequisite(prerequisite_name); end - def transform_comments(separator, &block); end - - class << self - def [](task_name); end - def clear; end - def create_rule(*args, &block); end - def define_task(*args, &block); end - def format_deps(deps); end - def scope_name(scope, task_name); end - def task_defined?(task_name); end - def tasks; end - end -end - -class Rake::TaskArgumentError < ::ArgumentError; end - -class Rake::TaskArguments - include ::Enumerable - - def initialize(names, values, parent = T.unsafe(nil)); end - - def [](index); end - def each(&block); end - def extras; end - def fetch(*args, &block); end - def has_key?(key); end - def inspect; end - def key?(key); end - def method_missing(sym, *args); end - def names; end - def new_scope(names); end - def to_a; end - def to_hash; end - def to_s; end - def values_at(*keys); end - def with_defaults(defaults); end - - protected - - def lookup(name); end -end - -class Rake::TaskLib - include ::Rake::Cloneable - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - include ::Rake::DSL -end - -module Rake::TaskManager - def initialize; end - - def [](task_name, scopes = T.unsafe(nil)); end - def clear; end - def create_rule(*args, &block); end - def current_scope; end - def define_task(task_class, *args, &block); end - def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end - def generate_did_you_mean_suggestions(task_name); end - def generate_message_for_undefined_task(task_name); end - def in_namespace(name); end - def intern(task_class, task_name); end - def last_description; end - def last_description=(_arg0); end - def lookup(task_name, initial_scope = T.unsafe(nil)); end - def resolve_args(args); end - def synthesize_file_task(task_name); end - def tasks; end - def tasks_in_scope(scope); end - - private - - def add_location(task); end - def attempt_rule(task_name, task_pattern, args, extensions, block, level); end - def find_location; end - def generate_name; end - def get_description(task); end - def lookup_in_scope(name, scope); end - def make_sources(task_name, task_pattern, extensions); end - def resolve_args_with_dependencies(args, hash); end - def resolve_args_without_dependencies(args); end - def trace_rule(level, message); end - - class << self - def record_task_metadata; end - def record_task_metadata=(_arg0); end - end -end - -class Rake::ThreadHistoryDisplay - include ::Rake::PrivateReader - extend ::Rake::PrivateReader::ClassMethods - - def initialize(stats); end - - def show; end - - private - - def items; end - def rename(hash, key, renames); end - def stats; end - def threads; end -end - -class Rake::ThreadPool - def initialize(thread_count); end - - def future(*args, &block); end - def gather_history; end - def history; end - def join; end - def statistics; end - - private - - def __queue__; end - def process_queue_item; end - def safe_thread_count; end - def start_thread; end - def stat(event, data = T.unsafe(nil)); end -end - -module Rake::TraceOutput - def trace_on(out, *strings); end -end - -Rake::VERSION = T.let(T.unsafe(nil), String) -module Rake::Version; end -Rake::Version::BUILD = T.let(T.unsafe(nil), String) -Rake::Version::MAJOR = T.let(T.unsafe(nil), String) -Rake::Version::MINOR = T.let(T.unsafe(nil), String) -Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) -Rake::Version::OTHER = T.let(T.unsafe(nil), Array) - -module Rake::Win32 - class << self - def normalize(path); end - def win32_system_dir; end - def windows?; end - end -end - -class Rake::Win32::Win32HomeError < ::RuntimeError; end -RakeFileUtils = Rake::FileUtilsExt - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend - - def ext(newext = T.unsafe(nil)); end - def pathmap(spec = T.unsafe(nil), &block); end - - protected - - def pathmap_explode; end - def pathmap_partial(n); end - def pathmap_replace(patterns, &block); end -end diff --git a/sorbet/rbi/gems/rake@13.4.2.rbi b/sorbet/rbi/gems/rake@13.4.2.rbi new file mode 100644 index 00000000..a310a8cf --- /dev/null +++ b/sorbet/rbi/gems/rake@13.4.2.rbi @@ -0,0 +1,3127 @@ +# 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. +# +# pkg:gem/rake#lib/rake.rb:68 +FileList = Rake::FileList + +# -- +# This a FileUtils extension that defines several additional commands to be +# added to the FileUtils utility functions. +# +# pkg:gem/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 + # + # pkg:gem/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'] + # + # pkg:gem/rake#lib/rake/file_utils.rb:131 + def split_all(path); end + + private + + # pkg:gem/rake#lib/rake/file_utils.rb:61 + def create_shell_runner(cmd); end + + # pkg:gem/rake#lib/rake/file_utils.rb:89 + def set_verbose_option(options); end + + # pkg:gem/rake#lib/rake/file_utils.rb:71 + def sh_show_command(cmd, options = T.unsafe(nil)); end +end + +# pkg:gem/rake#lib/rake/file_utils.rb:111 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# pkg:gem/rake#lib/rake/file_utils.rb:10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# pkg:gem/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 + # + # pkg:gem/rake#lib/rake/ext/core.rb:18 + def rake_extension(method); end +end + +# -- +# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# ++ +# :stopdoc: +# +# pkg:gem/rake#lib/rake.rb:24 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # pkg:gem/rake#lib/rake/rake_module.rb:33 + def add_rakelib(*files); end + + # Current Rake Application + # + # pkg:gem/rake#lib/rake/rake_module.rb:8 + def application; end + + # Set the current Rake application object. + # + # pkg:gem/rake#lib/rake/rake_module.rb:13 + def application=(app); end + + # Yield each file or directory component. + # + # pkg:gem/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 + # + # pkg:gem/rake#lib/rake/file_list.rb:429 + def from_pathname(path); end + + # Load a rakefile. + # + # pkg:gem/rake#lib/rake/rake_module.rb:28 + def load_rakefile(path); end + + # Return the original directory where the Rake application was started. + # + # pkg:gem/rake#lib/rake/rake_module.rb:23 + def original_dir; end + + # pkg:gem/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 + # + # pkg:gem/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. +# +# pkg:gem/rake#lib/rake/application.rb:20 +class Rake::Application + include ::Rake::TaskManager + include ::Rake::TraceOutput + + # Initialize a Rake::Application object. + # + # pkg:gem/rake#lib/rake/application.rb:50 + def initialize; end + + # Add a file to the list of files to be imported. + # + # pkg:gem/rake#lib/rake/application.rb:793 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # pkg:gem/rake#lib/rake/application.rb:162 + 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. + # + # pkg:gem/rake#lib/rake/application.rb:774 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # pkg:gem/rake#lib/rake/application.rb:788 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # pkg:gem/rake#lib/rake/application.rb:283 + def deprecate(old_usage, new_usage, call_site); end + + # pkg:gem/rake#lib/rake/application.rb:245 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # pkg:gem/rake#lib/rake/application.rb:229 + def display_error_message(ex); end + + # pkg:gem/rake#lib/rake/application.rb:270 + def display_exception_backtrace(ex); end + + # pkg:gem/rake#lib/rake/application.rb:237 + def display_exception_details(ex); end + + # pkg:gem/rake#lib/rake/application.rb:252 + def display_exception_details_seen; end + + # pkg:gem/rake#lib/rake/application.rb:260 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # pkg:gem/rake#lib/rake/application.rb:406 + def display_prerequisites; end + + # Display the tasks and comments. + # + # pkg:gem/rake#lib/rake/application.rb:323 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # pkg:gem/rake#lib/rake/application.rb:374 + def dynamic_width; end + + # pkg:gem/rake#lib/rake/application.rb:378 + def dynamic_width_stty; end + + # pkg:gem/rake#lib/rake/application.rb:382 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # pkg:gem/rake#lib/rake/application.rb:224 + def exit_because_of_exception(ex); end + + # pkg:gem/rake#lib/rake/application.rb:703 + 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. + # + # pkg:gem/rake#lib/rake/application.rb:669 + def handle_options(argv); end + + # pkg:gem/rake#lib/rake/application.rb:256 + 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. + # + # pkg:gem/rake#lib/rake/application.rb:299 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # pkg:gem/rake#lib/rake/application.rb:89 + def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end + + # Invokes a task with arguments that are extracted from +task_string+ + # + # pkg:gem/rake#lib/rake/application.rb:180 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # pkg:gem/rake#lib/rake/application.rb:798 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # pkg:gem/rake#lib/rake/application.rb:125 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # pkg:gem/rake#lib/rake/application.rb:25 + def name; end + + # Application options from the command line + # + # pkg:gem/rake#lib/rake/application.rb:168 + def options; end + + # The original directory where rake was invoked. + # + # pkg:gem/rake#lib/rake/application.rb:28 + def original_dir; end + + # pkg:gem/rake#lib/rake/application.rb:186 + def parse_task_string(string); end + + # pkg:gem/rake#lib/rake/application.rb:715 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # pkg:gem/rake#lib/rake/application.rb:689 + def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end + + # Name of the actual rakefile used. + # + # pkg:gem/rake#lib/rake/application.rb:31 + def rakefile; end + + # pkg:gem/rake#lib/rake/application.rb:814 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/application.rb:720 + 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. + # + # pkg:gem/rake#lib/rake/application.rb:80 + def run(argv = T.unsafe(nil)); end + + # Run the given block with the thread startup and shutdown. + # + # pkg:gem/rake#lib/rake/application.rb:145 + def run_with_threads; end + + # pkg:gem/rake#lib/rake/application.rb:823 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # pkg:gem/rake#lib/rake/application.rb:208 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # pkg:gem/rake#lib/rake/application.rb:427 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # pkg:gem/rake#lib/rake/application.rb:752 + def system_dir; end + + # Number of columns on the terminal + # + # pkg:gem/rake#lib/rake/application.rb:34 + def terminal_columns; end + + # Number of columns on the terminal + # + # pkg:gem/rake#lib/rake/application.rb:34 + def terminal_columns=(_arg0); end + + # pkg:gem/rake#lib/rake/application.rb:362 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # pkg:gem/rake#lib/rake/application.rb:173 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # pkg:gem/rake#lib/rake/application.rb:132 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # pkg:gem/rake#lib/rake/application.rb:37 + def top_level_tasks; end + + # pkg:gem/rake#lib/rake/application.rb:413 + def trace(*strings); end + + # pkg:gem/rake#lib/rake/application.rb:395 + 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 + # + # pkg:gem/rake#lib/rake/application.rb:318 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # pkg:gem/rake#lib/rake/application.rb:40 + def tty_output=(_arg0); end + + # True if we are outputting to TTY, false otherwise + # + # pkg:gem/rake#lib/rake/application.rb:312 + def tty_output?; end + + # pkg:gem/rake#lib/rake/application.rb:386 + def unix?; end + + # pkg:gem/rake#lib/rake/application.rb:391 + def windows?; end + + private + + # pkg:gem/rake#lib/rake/application.rb:746 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # pkg:gem/rake#lib/rake/application.rb:292 + def has_chain?(exception); end + + # pkg:gem/rake#lib/rake/application.rb:103 + def load_debug_at_stop_feature; end + + # pkg:gem/rake#lib/rake/application.rb:645 + def select_tasks_to_show(options, show_tasks, value); end + + # pkg:gem/rake#lib/rake/application.rb:652 + def select_trace_output(options, trace_option, value); end + + # pkg:gem/rake#lib/rake/application.rb:418 + def sort_options(options); end + + # The standard directory containing system wide rake files. + # + # pkg:gem/rake#lib/rake/application.rb:757 + def standard_system_dir; end +end + +# pkg:gem/rake#lib/rake/application.rb:42 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/backtrace.rb:3 +module Rake::Backtrace + class << self + # pkg:gem/rake#lib/rake/backtrace.rb:19 + def collapse(backtrace); end + end +end + +# pkg:gem/rake#lib/rake/backtrace.rb:8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/backtrace.rb:12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# pkg:gem/rake#lib/rake/backtrace.rb:17 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rake#lib/rake/backtrace.rb:4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/backtrace.rb:5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# pkg:gem/rake#lib/rake/cloneable.rb:6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # pkg:gem/rake#lib/rake/cloneable.rb:8 + def initialize_copy(source); end +end + +# pkg:gem/rake#lib/rake/application.rb:14 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# pkg:gem/rake#lib/rake/cpu_counter.rb:6 +class Rake::CpuCounter + # pkg:gem/rake#lib/rake/cpu_counter.rb:22 + def count; end + + # pkg:gem/rake#lib/rake/cpu_counter.rb:11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # pkg:gem/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. +# +# pkg:gem/rake#lib/rake/dsl_definition.rb:14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def cd(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def chdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def chmod(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def chmod_R(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def chown(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def chown_R(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def copy(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def cp(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def cp_lr(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] do + # # ... run tests + # end + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:166 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # pkg:gem/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 + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:76 + def file(*args, &block); end + + # Declare a file creation task. + # (Mainly used for the directory command). + # + # pkg:gem/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" + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:184 + def import(*fns); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def install(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def link(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def ln(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def ln_s(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def ln_sf(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def ln_sr(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def makedirs(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def mkdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def mkdir_p(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def mkpath(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:113 + def multitask(*args, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:136 + def namespace(name = T.unsafe(nil), &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def nowrite(value = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rake_check_options(options, *optdecl); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rake_output_message(message); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def remove(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rm(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rm_f(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rm_r(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rm_rf(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rmdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def rmtree(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-c', '-o', t.name, t.source + # end + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:152 + def rule(*args, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 + def safe_ln(*args, **options); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def safe_unlink(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 + def sh(*cmd, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 + def split_all(path); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # pkg:gem/rake#lib/rake/dsl_definition.rb:59 + def task(*args, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def touch(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def verbose(value = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# pkg:gem/rake#lib/rake/default_loader.rb:5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # pkg:gem/rake#lib/rake/default_loader.rb:10 + def load(fn); end +end + +# pkg:gem/rake#lib/rake/early_time.rb:21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# pkg:gem/rake#lib/rake/task_arguments.rb:112 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# pkg:gem/rake#lib/rake/early_time.rb:5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # pkg:gem/rake#lib/rake/early_time.rb:12 + def <=>(other); end + + # pkg:gem/rake#lib/rake/early_time.rb:16 + def to_s; end + + class << self + private + + # pkg:gem/rake#lib/rake/early_time.rb:7 + def allocate; end + + # pkg:gem/rake#lib/rake/early_time.rb:7 + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# pkg:gem/rake#lib/rake/file_creation_task.rb:12 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # pkg:gem/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. + # + # pkg:gem/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. +# +# pkg:gem/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 + # + # pkg:gem/rake#lib/rake/file_list.rb:99 + def initialize(*patterns); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # pkg:gem/rake#lib/rake/file_list.rb:193 + def *(other); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def +(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def -(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:203 + def <<(obj); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # pkg:gem/rake#lib/rake/file_list.rb:171 + def ==(array); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def [](*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def []=(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:128 + def add(*filenames); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def all?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def any?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def append(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def assoc(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def at(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def bsearch(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def bsearch_index(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def chain(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def chunk(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def chunk_while(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # pkg:gem/rake#lib/rake/file_list.rb:164 + def clear_exclude; end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def collect(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def collect!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def collect_concat(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def combination(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def compact(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def compact!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def concat(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def count(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def cycle(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def deconstruct(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def delete(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def delete_at(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def delete_if(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def detect(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def difference(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def dig(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def drop(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def drop_while(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_cons(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_entry(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_index(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_slice(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_with_index(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # pkg:gem/rake#lib/rake/file_list.rb:293 + def egrep(pattern, *options); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def empty?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/file_list.rb:284 + def ext(newext = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def fetch(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def fetch_values(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def fill(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def filter(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def filter!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def filter_map(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def find(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def find_all(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def find_index(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def first(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def flat_map(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def flatten(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def flatten!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def grep(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def grep_v(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # pkg:gem/rake#lib/rake/file_list.rb:253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # pkg:gem/rake#lib/rake/file_list.rb:264 + def gsub!(pat, rep); end + + # pkg:gem/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 ) + # + # pkg:gem/rake#lib/rake/file_list.rb:116 + def include(*filenames); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def include?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def index(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def inject(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def insert(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def inspect(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def intersect?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def intersection(*args, &block); end + + # Lie about our class. + # + # pkg:gem/rake#lib/rake/file_list.rb:187 + def is_a?(klass); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def join(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def keep_if(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:190 + def kind_of?(klass); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def last(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def lazy(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def length(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def map(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def map!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def max(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def max_by(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def member?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def min(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def min_by(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def minmax(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def minmax_by(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def none?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def one?(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # pkg:gem/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.) + # + # pkg:gem/rake#lib/rake/file_list.rb:272 + def pathmap(spec = T.unsafe(nil), &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def permutation(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def pop(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def prepend(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def product(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def push(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rassoc(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def reduce(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def reject(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def reject!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def repeated_combination(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def repeated_permutation(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # pkg:gem/rake#lib/rake/file_list.rb:210 + def resolve; end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def reverse(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def reverse!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def reverse_each(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rindex(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rotate(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rotate!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def sample(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def select(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def select!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def shelljoin(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def shift(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def shuffle(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def shuffle!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def size(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def slice(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def slice!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def slice_after(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def slice_before(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def slice_when(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def sort(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def sort!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def sort_by(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # pkg:gem/rake#lib/rake/file_list.rb:242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # pkg:gem/rake#lib/rake/file_list.rb:258 + def sub!(pat, rep); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def sum(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def take(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def take_while(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def tally(*args, &block); end + + # Return the internal array object. + # + # pkg:gem/rake#lib/rake/file_list.rb:176 + def to_a; end + + # Return the internal array object. + # + # pkg:gem/rake#lib/rake/file_list.rb:182 + def to_ary; end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def to_h(*args, &block); end + + # Convert a FileList to a string by joining all elements with a space. + # + # pkg:gem/rake#lib/rake/file_list.rb:344 + def to_s; end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def to_set(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def transpose(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def union(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def uniq(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def uniq!(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def unshift(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def values_at(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 + def zip(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:67 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # pkg:gem/rake#lib/rake/file_list.rb:350 + def add_matching(pattern); end + + # pkg:gem/rake#lib/rake/file_list.rb:220 + def resolve_add(fn); end + + # pkg:gem/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) + # + # pkg:gem/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. + # + # pkg:gem/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. +# +# pkg:gem/rake#lib/rake/file_list.rb:44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/file_list.rb:381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/file_list.rb:387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rake#lib/rake/file_list.rb:61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/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. +# +# pkg:gem/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). +# +# pkg:gem/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. +# +# pkg:gem/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). +# +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/file_task.rb:16 + def needed?; end + + # Time stamp for file task. + # + # pkg:gem/rake#lib/rake/file_task.rb:25 + def timestamp; end + + private + + # Are there any prerequisites with a later time than the given time stamp? + # + # pkg:gem/rake#lib/rake/file_task.rb:36 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # pkg:gem/rake#lib/rake/file_task.rb:53 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# pkg:gem/rake#lib/rake/file_utils_ext.rb:10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def cd(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def chdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def chmod(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def chmod_R(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def chown(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def chown_R(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def copy(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def cp(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def cp_lr(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def cp_r(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def install(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def link(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def ln(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def ln_s(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def ln_sf(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def ln_sr(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def makedirs(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def mkdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def mkdir_p(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def mkpath(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def move(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # pkg:gem/rake#lib/rake/file_utils_ext.rb:78 + 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. + # + # pkg:gem/rake#lib/rake/file_utils_ext.rb:124 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # pkg:gem/rake#lib/rake/file_utils_ext.rb:117 + def rake_output_message(message); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def remove(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rm(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rm_f(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rm_r(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rm_rf(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rmdir(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def rmtree(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def safe_unlink(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def symlink(*args, **options, &block); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/file_utils_ext.rb:108 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 + def nowrite_flag; end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 + def nowrite_flag=(_arg0); end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 + def verbose_flag; end + + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 + def verbose_flag=(_arg0); end + end +end + +# pkg:gem/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. +# +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/invocation_chain.rb:15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # pkg:gem/rake#lib/rake/invocation_chain.rb:9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # pkg:gem/rake#lib/rake/invocation_chain.rb:23 + def to_s; end + + private + + # pkg:gem/rake#lib/rake/invocation_chain.rb:34 + def prefix; end + + class << self + # Class level append. + # + # pkg:gem/rake#lib/rake/invocation_chain.rb:28 + def append(invocation, chain); end + end +end + +# pkg:gem/rake#lib/rake/invocation_chain.rb:55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# pkg:gem/rake#lib/rake/invocation_chain.rb:39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # pkg:gem/rake#lib/rake/invocation_chain.rb:46 + def append(invocation); end + + # pkg:gem/rake#lib/rake/invocation_chain.rb:42 + def member?(obj); end + + # pkg:gem/rake#lib/rake/invocation_chain.rb:50 + def to_s; end +end + +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:13 + def chain=(value); end +end + +# pkg:gem/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. +# +# pkg:gem/rake#lib/rake/late_time.rb:4 +class Rake::LateTime + include ::Comparable + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rake#lib/rake/late_time.rb:8 + def <=>(other); end + + # pkg:gem/rake#lib/rake/late_time.rb:12 + def to_s; end + + class << self + private + + # pkg:gem/rake#lib/rake/late_time.rb:6 + def allocate; end + + # pkg:gem/rake#lib/rake/late_time.rb:6 + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# pkg:gem/rake#lib/rake/linked_list.rb:6 +class Rake::LinkedList + include ::Enumerable + + # pkg:gem/rake#lib/rake/linked_list.rb:84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/linked_list.rb:12 + def conj(item); end + + # For each item in the list. + # + # pkg:gem/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 + # + # pkg:gem/rake#lib/rake/linked_list.rb:20 + def empty?; end + + # pkg:gem/rake#lib/rake/linked_list.rb:8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # pkg:gem/rake#lib/rake/linked_list.rb:42 + def inspect; end + + # pkg:gem/rake#lib/rake/linked_list.rb:8 + def tail; end + + # Convert to string: LL(item, item...) + # + # pkg:gem/rake#lib/rake/linked_list.rb:36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # pkg:gem/rake#lib/rake/linked_list.rb:73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # pkg:gem/rake#lib/rake/linked_list.rb:78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # pkg:gem/rake#lib/rake/linked_list.rb:59 + def make(*args); end + end +end + +# pkg:gem/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). +# +# pkg:gem/rake#lib/rake/linked_list.rb:95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # pkg:gem/rake#lib/rake/linked_list.rb:98 + def initialize; end + + # pkg:gem/rake#lib/rake/linked_list.rb:101 + def empty?; end + + class << self + # pkg:gem/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. +# +# pkg:gem/rake#lib/rake/multi_task.rb:7 +class Rake::MultiTask < ::Rake::Task + private + + # pkg:gem/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. +# +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/name_space.rb:12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # pkg:gem/rake#lib/rake/name_space.rb:20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # pkg:gem/rake#lib/rake/name_space.rb:27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # pkg:gem/rake#lib/rake/name_space.rb:34 + def tasks; end +end + +# Options used by the Rake command line application. +# +# pkg:gem/rake#lib/rake/options.rb:8 +class Rake::Options + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask; end + + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace; end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all; end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun; end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate; end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system; end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats; end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system; end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch; end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib; end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs; end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent; end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size; end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace; end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output; end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules; end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules=(_arg0); end +end + +# Include PrivateReader to use +private_reader+. +# +# pkg:gem/rake#lib/rake/private_reader.rb:5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # pkg:gem/rake#lib/rake/private_reader.rb:7 + def included(base); end + end +end + +# pkg:gem/rake#lib/rake/private_reader.rb:11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # pkg:gem/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. +# +# pkg:gem/rake#lib/rake/promise.rb:11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # pkg:gem/rake#lib/rake/promise.rb:17 + def initialize(args, &block); end + + # pkg:gem/rake#lib/rake/promise.rb:14 + def recorder; end + + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/promise.rb:29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # pkg:gem/rake#lib/rake/promise.rb:42 + def work; end + + private + + # Perform the chore promised + # + # pkg:gem/rake#lib/rake/promise.rb:57 + def chore; end + + # Are we done with the promise + # + # pkg:gem/rake#lib/rake/promise.rb:83 + def complete?; end + + # free up these items for the GC + # + # pkg:gem/rake#lib/rake/promise.rb:88 + def discard; end + + # Did the promise throw an error + # + # pkg:gem/rake#lib/rake/promise.rb:78 + def error?; end + + # Do we have a result for the promise + # + # pkg:gem/rake#lib/rake/promise.rb:73 + def result?; end + + # Record execution statistics if there is a recorder + # + # pkg:gem/rake#lib/rake/promise.rb:94 + def stat(*args); end +end + +# pkg:gem/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. +# +# pkg:gem/rake#lib/rake/pseudo_status.rb:6 +class Rake::PseudoStatus + # pkg:gem/rake#lib/rake/pseudo_status.rb:9 + def initialize(code = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/pseudo_status.rb:17 + def >>(n); end + + # pkg:gem/rake#lib/rake/pseudo_status.rb:25 + def exited?; end + + # pkg:gem/rake#lib/rake/pseudo_status.rb:7 + def exitstatus; end + + # pkg:gem/rake#lib/rake/pseudo_status.rb:21 + def stopped?; end + + # pkg:gem/rake#lib/rake/pseudo_status.rb:13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:5 +class Rake::RuleRecursionOverflowError < ::StandardError + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:6 + def initialize(*args); end + + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:11 + def add_target(target); end + + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:15 + def message; end +end + +# pkg:gem/rake#lib/rake/scope.rb:3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # pkg:gem/rake#lib/rake/scope.rb:6 + def path; end + + # Path for the scope + the named path. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/scope.rb:17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# pkg:gem/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) +# +# pkg:gem/rake#lib/rake/scope.rb:28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # pkg:gem/rake#lib/rake/scope.rb:31 + def path; end + + # pkg:gem/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. +# +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:39 + def already_invoked; end + + # Application owning this task. + # + # pkg:gem/rake#lib/rake/task.rb:27 + def application; end + + # Application owning this task. + # + # pkg:gem/rake#lib/rake/task.rb:27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # pkg:gem/rake#lib/rake/task.rb:136 + def arg_description; end + + # Name of arguments for this task. + # + # pkg:gem/rake#lib/rake/task.rb:141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # pkg:gem/rake#lib/rake/task.rb:153 + def clear; end + + # Clear the existing actions on a rake task. + # + # pkg:gem/rake#lib/rake/task.rb:168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # pkg:gem/rake#lib/rake/task.rb:180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # pkg:gem/rake#lib/rake/task.rb:174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # pkg:gem/rake#lib/rake/task.rb:162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # pkg:gem/rake#lib/rake/task.rb:322 + def comment; end + + # pkg:gem/rake#lib/rake/task.rb:304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # pkg:gem/rake#lib/rake/task.rb:115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # pkg:gem/rake#lib/rake/task.rb:270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # pkg:gem/rake#lib/rake/task.rb:316 + def full_comment; end + + # pkg:gem/rake#lib/rake/task.rb:46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # pkg:gem/rake#lib/rake/task.rb:354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # pkg:gem/rake#lib/rake/task.rb:186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # pkg:gem/rake#lib/rake/task.rb:237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # pkg:gem/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). + # + # pkg:gem/rake#lib/rake/task.rb:35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # pkg:gem/rake#lib/rake/task.rb:122 + def name; end + + # Name of task with argument list description. + # + # pkg:gem/rake#lib/rake/task.rb:127 + def name_with_args; end + + # Is this task needed? + # + # pkg:gem/rake#lib/rake/task.rb:286 + def needed?; end + + # List of order only prerequisites for a task. + # + # pkg:gem/rake#lib/rake/task.rb:21 + def order_only_prerequisites; end + + # pkg:gem/rake#lib/rake/task.rb:18 + def prereqs; end + + # List of prerequisite tasks + # + # pkg:gem/rake#lib/rake/task.rb:61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # pkg:gem/rake#lib/rake/task.rb:17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # pkg:gem/rake#lib/rake/task.rb:147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # pkg:gem/rake#lib/rake/task.rb:93 + def source; end + + # List of sources for task. + # + # pkg:gem/rake#lib/rake/task.rb:52 + def sources; end + + # List of sources for task. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:292 + def timestamp; end + + # Return task name + # + # pkg:gem/rake#lib/rake/task.rb:42 + def to_s; end + + # Add order only dependencies. + # + # pkg:gem/rake#lib/rake/task.rb:379 + def |(deps); end + + protected + + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # pkg:gem/rake#lib/rake/task.rb:229 + def add_chain_to(exception, new_chain); end + + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # pkg:gem/rake#lib/rake/task.rb:261 + def format_trace_flags; end + + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/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.) + # + # pkg:gem/rake#lib/rake/task.rb:391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task.rb:428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # pkg:gem/rake#lib/rake/task.rb:409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # pkg:gem/rake#lib/rake/task.rb:396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# pkg:gem/rake#lib/rake/task_argument_error.rb:5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_arguments.rb:15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # pkg:gem/rake#lib/rake/task_arguments.rb:44 + def [](index); end + + # pkg:gem/rake#lib/rake/task_arguments.rb:97 + def deconstruct_keys(keys); end + + # Enumerates the arguments and their values + # + # pkg:gem/rake#lib/rake/task_arguments.rb:56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # pkg:gem/rake#lib/rake/task_arguments.rb:32 + def extras; end + + # pkg:gem/rake#lib/rake/task_arguments.rb:93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # pkg:gem/rake#lib/rake/task_arguments.rb:88 + def has_key?(key); end + + # pkg:gem/rake#lib/rake/task_arguments.rb:79 + def inspect; end + + # pkg:gem/rake#lib/rake/task_arguments.rb:91 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # pkg:gem/rake#lib/rake/task_arguments.rb:66 + def method_missing(sym, *args); end + + # Argument names + # + # pkg:gem/rake#lib/rake/task_arguments.rb:11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # pkg:gem/rake#lib/rake/task_arguments.rb:38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # pkg:gem/rake#lib/rake/task_arguments.rb:27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # pkg:gem/rake#lib/rake/task_arguments.rb:71 + def to_hash; end + + # pkg:gem/rake#lib/rake/task_arguments.rb:75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_arguments.rb:51 + def with_defaults(defaults); end + + protected + + # pkg:gem/rake#lib/rake/task_arguments.rb:103 + def lookup(name); end +end + +# The TaskManager module is a mixin for managing tasks. +# +# pkg:gem/rake#lib/rake/task_manager.rb:5 +module Rake::TaskManager + # pkg:gem/rake#lib/rake/task_manager.rb:9 + def initialize; end + + # Find a matching task for +task_name+. + # + # pkg:gem/rake#lib/rake/task_manager.rb:54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # pkg:gem/rake#lib/rake/task_manager.rb:182 + def clear; end + + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_manager.rb:222 + def current_scope; end + + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_manager.rb:151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # pkg:gem/rake#lib/rake/task_manager.rb:68 + def generate_did_you_mean_suggestions(task_name); end + + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_manager.rb:49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # pkg:gem/rake#lib/rake/task_manager.rb:7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # pkg:gem/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. + # + # pkg:gem/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]. + # + # pkg:gem/rake#lib/rake/task_manager.rb:88 + def resolve_args(args); end + + # pkg:gem/rake#lib/rake/task_manager.rb:81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # pkg:gem/rake#lib/rake/task_manager.rb:168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_manager.rb:241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # pkg:gem/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. + # + # pkg:gem/rake#lib/rake/task_manager.rb:248 + def find_location; end + + # Generate an anonymous namespace name. + # + # pkg:gem/rake#lib/rake/task_manager.rb:259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # pkg:gem/rake#lib/rake/task_manager.rb:321 + def get_description; end + + # Lookup the task name + # + # pkg:gem/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. + # + # pkg:gem/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] + # + # pkg:gem/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] + # + # pkg:gem/rake#lib/rake/task_manager.rb:105 + def resolve_args_without_dependencies(args); end + + # pkg:gem/rake#lib/rake/task_manager.rb:265 + def trace_rule(level, message); end + + class << self + # pkg:gem/rake#lib/rake/task_manager.rb:328 + def record_task_metadata; end + + # pkg:gem/rake#lib/rake/task_manager.rb:328 + def record_task_metadata=(_arg0); end + end +end + +# pkg:gem/rake#lib/rake/thread_history_display.rb:6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # pkg:gem/rake#lib/rake/thread_history_display.rb:11 + def initialize(stats); end + + # pkg:gem/rake#lib/rake/thread_history_display.rb:17 + def show; end + + private + + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 + def items; end + + # pkg:gem/rake#lib/rake/thread_history_display.rb:35 + def rename(hash, key, renames); end + + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 + def stats; end + + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 + def threads; end +end + +# pkg:gem/rake#lib/rake/thread_pool.rb:8 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # pkg:gem/rake#lib/rake/thread_pool.rb:12 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # pkg:gem/rake#lib/rake/thread_pool.rb:33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # pkg:gem/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). + # + # pkg:gem/rake#lib/rake/thread_pool.rb:77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # pkg:gem/rake#lib/rake/thread_pool.rb:44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # pkg:gem/rake#lib/rake/thread_pool.rb:84 + def statistics; end + + private + + # for testing only + # + # pkg:gem/rake#lib/rake/thread_pool.rb:152 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # pkg:gem/rake#lib/rake/thread_pool.rb:95 + def process_queue_item; end + + # pkg:gem/rake#lib/rake/thread_pool.rb:111 + def start_thread; end + + # pkg:gem/rake#lib/rake/thread_pool.rb:139 + def stat(event, data = T.unsafe(nil)); end +end + +# pkg:gem/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. + # + # pkg:gem/rake#lib/rake/trace_output.rb:10 + def trace_on(out, *strings); end +end + +# pkg:gem/rake#lib/rake/version.rb:3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rake#lib/rake/version.rb:5 +module Rake::Version; end + +# pkg:gem/rake#lib/rake/version.rb:6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# pkg:gem/rake#lib/rake/version.rb:6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rake#lib/rake/version.rb:6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rake#lib/rake/version.rb:8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/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. +# +# pkg:gem/rake#lib/rake/win32.rb:7 +module Rake::Win32 + class << self + # True if running on a windows system. + # + # pkg:gem/rake#lib/rake/win32.rb:11 + def windows?; end + end +end + +# pkg:gem/rake#lib/rake.rb:69 +RakeFileUtils = Rake::FileUtilsExt + +# pkg:gem/rake#lib/rake/ext/string.rb:4 +class String + include ::Comparable + + # Replace the file extension with +newext+. If there is no extension on + # the string, append the new extension to the end. If the new extension + # is not given, or is the empty string, remove any existing extension. + # + # +ext+ is a user added method for the String class. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:14 + def ext(newext = T.unsafe(nil)); end + + # Map the path according to the given specification. The specification + # controls the details of the mapping. The following special patterns are + # recognized: + # + # %p :: The complete path. + # %f :: The base file name of the path, with its file extension, + # but without any directories. + # %n :: The file name of the path without its file extension. + # %d :: The directory list of the path. + # %x :: The file extension of the path. An empty string if there + # is no extension. + # %X :: Everything *but* the file extension. + # %s :: The alternate file separator if defined, otherwise use # + # the standard file separator. + # %% :: A percent sign. + # + # The %d specifier can also have a numeric prefix (e.g. '%2d'). + # If the number is positive, only return (up to) +n+ directories in the + # path, starting from the left hand side. If +n+ is negative, return (up + # to) +n+ directories from the right hand side of the path. + # + # Examples: + # + # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b' + # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' + # + # Also the %d, %p, %f, %n, + # %x, and %X operators can take a pattern/replacement + # argument to perform simple string substitutions on a particular part of + # the path. The pattern and replacement are separated by a comma and are + # enclosed by curly braces. The replacement spec comes after the % + # character but before the operator letter. (e.g. "%{old,new}d"). + # Multiple replacement specs should be separated by semi-colons (e.g. + # "%{old,new;src,bin}d"). + # + # Regular expressions may be used for the pattern, and back refs may be + # used in the replacement text. Curly braces, commas and semi-colons are + # excluded from both the pattern and replacement text (let's keep parsing + # reasonable). + # + # For example: + # + # "src/org/onestepback/proj/A.java".pathmap("%{^src,class}X.class") + # + # returns: + # + # "class/org/onestepback/proj/A.class" + # + # If the replacement text is '*', then a block may be provided to perform + # some arbitrary calculation for the replacement. + # + # For example: + # + # "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| + # ext.downcase + # } + # + # Returns: + # + # "/path/to/file.txt" + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # Explode a path into individual components. Used by +pathmap+. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:27 + def pathmap_explode; end + + # Extract a partial path from the path. Include +n+ directories from the + # front end (left hand side) if +n+ is positive. Include |+n+| + # directories from the back end (right hand side) if +n+ is negative. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:41 + def pathmap_partial(n); end + + # Perform the pathmap replacement operations on the given path. The + # patterns take the form 'pat1,rep1;pat2,rep2...'. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:59 + def pathmap_replace(patterns, &block); end +end diff --git a/sorbet/rbi/gems/rbi@0.0.9.rbi b/sorbet/rbi/gems/rbi@0.0.9.rbi deleted file mode 100644 index f18f41c1..00000000 --- a/sorbet/rbi/gems/rbi@0.0.9.rbi +++ /dev/null @@ -1,1602 +0,0 @@ -# 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`. - -module RBI; end - -class RBI::ASTVisitor - abstract! - - def initialize(*args, **_arg1_arg1, &blk); end - - sig { abstract.params(node: T.nilable(AST::Node)).void } - def visit(node); end - - sig { params(nodes: T::Array[AST::Node]).void } - def visit_all(nodes); end - - private - - sig { params(node: AST::Node).returns(String) } - def parse_expr(node); end - - sig { params(node: AST::Node).returns(String) } - def parse_name(node); end -end - -class RBI::Arg < ::RBI::Node - sig { params(value: String, loc: T.nilable(RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(String) } - def to_s; end - - sig { returns(String) } - def value; end -end - -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - sig { 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 } - def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { abstract.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.params(other: RBI::Node).void } - def merge_with(other); end - - sig { returns(T::Array[Symbol]) } - def names; end - - def names=(_arg0); end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { returns(T::Array[RBI::Sig]) } - def sigs; end - - sig { returns(RBI::Visibility) } - def visibility; end - - def visibility=(_arg0); end -end - -class RBI::AttrAccessor < ::RBI::Attr - sig { 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 } - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::AttrReader < ::RBI::Attr - sig { 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 } - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::AttrWriter < ::RBI::Attr - sig { 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 } - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::BlankLine < ::RBI::Comment - sig { params(loc: T.nilable(RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end -end - -class RBI::BlockParam < ::RBI::Param - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::BlockParam).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Class < ::RBI::Scope - sig { 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 } - def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(String) } - def fully_qualified_name; end - - sig { returns(String) } - def name; end - - def name=(_arg0); end - - sig { override.params(v: RBI::Printer).void } - def print_header(v); end - - sig { returns(T.nilable(String)) } - def superclass_name; end - - def superclass_name=(_arg0); end -end - -class RBI::Comment < ::RBI::Node - sig { params(text: String, loc: T.nilable(RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - sig { params(other: Object).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(String) } - def text; end - - def text=(_arg0); end -end - -class RBI::ConflictTree < ::RBI::Tree - sig { params(left_name: String, right_name: String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(RBI::Tree) } - def left; end - - def right; end -end - -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - sig { 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 } - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { returns(String) } - def fully_qualified_name; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { returns(String) } - def name; end - - sig { override.returns(String) } - def to_s; end - - def value; end -end - -class RBI::ConstBuilder < ::RBI::ASTVisitor - sig { void } - def initialize; end - - sig { returns(T::Array[String]) } - def names; end - - def names=(_arg0); end - - sig { override.params(node: T.nilable(AST::Node)).void } - def visit(node); end - - class << self - sig { params(node: T.nilable(AST::Node)).returns(T.nilable(String)) } - def visit(node); end - end -end - -class RBI::Error < ::StandardError; end - -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - sig { 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 } - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::File - sig { params(strictness: T.nilable(String), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(file: RBI::File).void)).void } - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(node: RBI::Node).void } - def <<(node); end - - sig { params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Array[RBI::Comment]) } - def comments; end - - def comments=(_arg0); end - - sig { returns(T::Boolean) } - def empty?; end - - sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void } - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { returns(RBI::Tree) } - def root; end - - def root=(_arg0); end - - sig { void } - def set_empty_body_content; end - - sig { params(command: String, reason: T.nilable(String), display_heading: T::Boolean).void } - def set_file_header(command, reason: T.unsafe(nil), display_heading: T.unsafe(nil)); end - - sig { returns(T.nilable(String)) } - def strictness; end - - def strictness=(_arg0); end - - sig { params(indent: Integer, print_locs: T::Boolean).returns(String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { void } - def transform_rbi!; end - - sig { returns(String) } - def transformed_string; end -end - -class RBI::Group < ::RBI::Tree - sig { params(kind: RBI::Group::Kind).void } - def initialize(kind); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(RBI::Group::Kind) } - def kind; end -end - -class RBI::Group::Kind < ::T::Enum - enums do - Mixins = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new - TStructFields = new - TEnums = new - Inits = new - Methods = new - SingletonClasses = new - Consts = new - end -end - -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Helper).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { returns(String) } - def name; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - sig { 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 } - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Index < ::RBI::Visitor - sig { void } - def initialize; end - - sig { params(id: String).returns(T::Array[RBI::Node]) } - def [](id); end - - sig { params(nodes: RBI::Node).void } - def index(*nodes); end - - sig { returns(T::Array[String]) } - def keys; end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { params(node: T.all(RBI::Indexable, RBI::Node)).void } - def index_node(node); end - - class << self - sig { params(node: RBI::Node).returns(RBI::Index) } - def index(*node); end - end -end - -module RBI::Indexable - interface! - - sig { abstract.returns(T::Array[String]) } - def index_ids; end -end - -class RBI::KwArg < ::RBI::Arg - sig { params(keyword: String, value: String, loc: T.nilable(RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(String) } - def keyword; end - - sig { returns(String) } - def to_s; end -end - -class RBI::KwOptParam < ::RBI::Param - sig { 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 } - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end - - sig { returns(String) } - def value; end -end - -class RBI::KwParam < ::RBI::Param - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwParam).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::KwRestParam < ::RBI::Param - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwRestParam).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Loc - sig { 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 } - 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 - - def begin_column; end - - sig { returns(T.nilable(Integer)) } - def begin_line; end - - def end_column; end - def end_line; end - - sig { returns(T.nilable(String)) } - def file; end - - sig { returns(String) } - def to_s; end - - class << self - 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 - -class RBI::MergeTree < ::RBI::Tree - sig { 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 } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - - sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - sig { 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 } - 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 - - sig { params(param: RBI::Param).void } - def <<(param); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { returns(String) } - def fully_qualified_name; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { returns(T::Boolean) } - def inline_params?; end - - sig { returns(T::Boolean) } - def is_singleton; end - - def is_singleton=(_arg0); end - - sig { override.params(other: RBI::Node).void } - def merge_with(other); end - - sig { returns(String) } - def name; end - - def name=(_arg0); end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { returns(T::Array[RBI::Param]) } - def params; end - - sig { returns(T::Array[RBI::Sig]) } - def sigs; end - - def sigs=(_arg0); end - - sig { override.returns(String) } - def to_s; end - - sig { returns(RBI::Visibility) } - def visibility; end - - def visibility=(_arg0); end -end - -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - sig { 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 } - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - sig { params(name: String, names: T::Array[String], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void } - def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { returns(T::Array[String]) } - def names; end - - def names=(_arg0); end -end - -class RBI::Module < ::RBI::Scope - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Module).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(String) } - def fully_qualified_name; end - - sig { returns(String) } - def name; end - - def name=(_arg0); end - - sig { override.params(v: RBI::Printer).void } - def print_header(v); end -end - -class RBI::Node - abstract! - - sig { params(loc: T.nilable(RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - sig { abstract.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { params(_other: RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - sig { void } - def detach; end - - sig { returns(RBI::Group::Kind) } - def group_kind; end - - sig { returns(T.nilable(RBI::Loc)) } - def loc; end - - def loc=(_arg0); end - - sig { params(other: RBI::Node).void } - def merge_with(other); end - - sig { returns(T::Boolean) } - def oneline?; end - - sig { returns(T.nilable(RBI::ConflictTree)) } - def parent_conflict_tree; end - - sig { returns(T.nilable(RBI::Scope)) } - def parent_scope; end - - sig { returns(T.nilable(RBI::Tree)) } - def parent_tree; end - - def parent_tree=(_arg0); end - - sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void } - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { params(v: RBI::Printer).void } - def print_blank_line_before(v); end - - sig { params(node: RBI::Node).void } - def replace(node); end - - sig { params(indent: Integer, print_locs: T::Boolean).returns(String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end -end - -class RBI::NodeWithComments < ::RBI::Node - abstract! - - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - sig { returns(T::Array[String]) } - def annotations; end - - sig { returns(T::Array[RBI::Comment]) } - def comments; end - - def comments=(_arg0); end - - sig { override.params(other: RBI::Node).void } - def merge_with(other); end - - sig { override.returns(T::Boolean) } - def oneline?; end -end - -class RBI::OptParam < ::RBI::Param - sig { 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 } - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { returns(String) } - def value; end -end - -class RBI::Param < ::RBI::NodeWithComments - abstract! - - 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 - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Array[String]) } - def comments_lines; end - - sig { returns(String) } - def name; end - - sig { params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::ParseError < ::StandardError - sig { params(message: String, location: RBI::Loc).void } - def initialize(message, location); end - - sig { returns(RBI::Loc) } - def location; end -end - -class RBI::Parser - sig { void } - def initialize; end - - sig { params(path: String).returns(RBI::Tree) } - def parse_file(path); end - - sig { params(string: String).returns(RBI::Tree) } - def parse_string(string); end - - private - - sig { params(content: String, file: String).returns(RBI::Tree) } - def parse(content, file:); end - - class << self - sig { params(path: String).returns(RBI::Tree) } - def parse_file(path); end - - sig { params(paths: T::Array[String]).returns(T::Array[RBI::Tree]) } - def parse_files(paths); end - - sig { params(string: String).returns(RBI::Tree) } - def parse_string(string); end - - sig { params(strings: T::Array[String]).returns(T::Array[RBI::Tree]) } - def parse_strings(strings); end - end -end - -class RBI::Printer < ::RBI::Visitor - sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void } - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { void } - def dedent; end - - def in_visibility_group; end - def in_visibility_group=(_arg0); end - - sig { void } - def indent; end - - sig { returns(T.nilable(RBI::Node)) } - def previous_node; end - - sig { params(string: String).void } - def print(string); end - - sig { returns(T::Boolean) } - def print_locs; end - - def print_locs=(_arg0); end - - sig { params(string: String).void } - def printl(string); end - - sig { params(string: T.nilable(String)).void } - def printn(string = T.unsafe(nil)); end - - sig { params(string: T.nilable(String)).void } - def printt(string = T.unsafe(nil)); end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - sig { override.params(nodes: T::Array[RBI::Node]).void } - def visit_all(nodes); end - - sig { params(file: RBI::File).void } - def visit_file(file); end -end - -class RBI::Private < ::RBI::Visibility - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Private).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -class RBI::Protected < ::RBI::Visibility - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Protected).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -class RBI::Public < ::RBI::Visibility - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Public).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -class RBI::ReqParam < ::RBI::Param - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::ReqParam).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end -end - -class RBI::RestParam < ::RBI::Param - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::RestParam).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - sig { override.returns(String) } - def to_s; end -end - -module RBI::Rewriters; end - -class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { params(attr: RBI::Attr).void } - def add_attr_sig(attr); end - - sig { params(method: RBI::Method).void } - def add_method_sig(method); end - - sig { params(node: RBI::NodeWithComments).void } - def add_todo_comment(node); end -end - -class RBI::Rewriters::Annotate < ::RBI::Visitor - 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 - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { params(node: RBI::NodeWithComments).void } - def annotate_node(node); end - - sig { params(node: RBI::Node).returns(T::Boolean) } - def root?(node); end -end - -class RBI::Rewriters::Deannotate < ::RBI::Visitor - sig { params(annotation: String).void } - def initialize(annotation); end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { params(node: RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end -end - -class RBI::Rewriters::Merge - 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 - - sig { params(tree: RBI::Tree).void } - def merge(tree); end - - sig { returns(RBI::MergeTree) } - def tree; end - - class << self - sig { params(left: RBI::Tree, right: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) } - def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - end -end - -class RBI::Rewriters::Merge::Conflict < ::T::Struct - const :left, RBI::Node - const :left_name, String - const :right, RBI::Node - const :right_name, String - - sig { returns(String) } - def to_s; end - - class << self - def inherited(s); end - end -end - -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - sig { override.params(nodes: T::Array[RBI::Node]).void } - def visit_all(nodes); end - - private - - sig { params(left: RBI::Tree, right: RBI::Tree).void } - def merge_conflict_trees(left, right); end -end - -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - NONE = new - LEFT = new - RIGHT = new - end -end - -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - sig { params(output: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).void } - def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { returns(RBI::Tree) } - def current_scope; end - - sig { params(left: RBI::Scope, right: RBI::Scope).void } - def make_conflict_scope(left, right); end - - sig { params(left: RBI::Node, right: RBI::Node).void } - def make_conflict_tree(left, right); end - - sig { params(node: RBI::Node).returns(T.nilable(RBI::Node)) } - def previous_definition(node); end - - sig { params(left: RBI::Scope, right: RBI::Scope).returns(RBI::Scope) } - def replace_scope_header(left, right); end -end - -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end -end - -class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end -end - -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - sig { params(index: RBI::Index).void } - def initialize(index); end - - sig { returns(T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - sig { params(nodes: T::Array[RBI::Node]).void } - def visit_all(nodes); end - - private - - sig { params(node: RBI::Node, previous: RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - sig { params(node: RBI::Node, previous: RBI::Node).void } - def delete_node(node, previous); end - - sig { params(node: RBI::Indexable).returns(T.nilable(RBI::Node)) } - def previous_definition_for(node); end - - class << self - sig { params(tree: RBI::Tree, index: RBI::Index).returns([RBI::Tree, T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]]) } - def remove(tree, index); end - end -end - -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, RBI::Node - const :duplicate_of, RBI::Node - - sig { returns(String) } - def to_s; end - - class << self - def inherited(s); end - end -end - -class RBI::Rewriters::SortNodes < ::RBI::Visitor - sig { override.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - private - - sig { params(kind: RBI::Group::Kind).returns(Integer) } - def group_rank(kind); end - - sig { params(node: RBI::Node).returns(T.nilable(String)) } - def node_name(node); end - - sig { params(node: RBI::Node).returns(Integer) } - def node_rank(node); end -end - -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - def initialize(*args, **_arg1_arg1, &blk); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T.self_type) } - def dup_empty; end - - sig { abstract.returns(String) } - def fully_qualified_name; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { params(v: RBI::Printer).void } - def print_body(v); end - - sig { abstract.params(v: RBI::Printer).void } - def print_header(v); end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::ScopeConflict < ::RBI::Tree - 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 - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(RBI::Scope) } - def left; end - - sig { override.returns(T::Boolean) } - def oneline?; end - - def right; end -end - -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - sig { 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 } - def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(arg: RBI::Arg).void } - def <<(arg); end - - sig { params(other: T.nilable(Object)).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Array[RBI::Arg]) } - def args; end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { returns(String) } - def method; end - - sig { returns(String) } - def to_s; end -end - -class RBI::Sig < ::RBI::Node - sig { params(params: T::Array[RBI::SigParam], return_type: T.nilable(String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: 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 } - 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), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - - sig { params(param: RBI::SigParam).void } - def <<(param); end - - sig { params(other: Object).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T.nilable(Symbol)) } - def checked; end - - def checked=(_arg0); end - - sig { returns(T::Boolean) } - def inline_params?; end - - sig { returns(T::Boolean) } - def is_abstract; end - - def is_abstract=(_arg0); end - def is_overridable; end - def is_overridable=(_arg0); end - def is_override; end - def is_override=(_arg0); end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { returns(T::Array[RBI::SigParam]) } - def params; end - - sig { returns(T.nilable(String)) } - def return_type; end - - def return_type=(_arg0); end - - sig { returns(T::Array[String]) } - def type_params; end -end - -class RBI::SigBuilder < ::RBI::ASTVisitor - sig { void } - def initialize; end - - sig { returns(RBI::Sig) } - def current; end - - def current=(_arg0); end - - sig { override.params(node: T.nilable(AST::Node)).void } - def visit(node); end - - sig { params(node: AST::Node).void } - def visit_send(node); end - - class << self - sig { params(node: AST::Node).returns(RBI::Sig) } - def build(node); end - end -end - -class RBI::SigParam < ::RBI::NodeWithComments - sig { 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 } - def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(other: Object).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Array[String]) } - def comments_lines; end - - sig { returns(String) } - def name; end - - sig { params(v: RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - def type; end -end - -class RBI::SingletonClass < ::RBI::Scope - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::SingletonClass).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.returns(String) } - def fully_qualified_name; end - - sig { override.params(v: RBI::Printer).void } - def print_header(v); end -end - -class RBI::Struct < ::RBI::Scope - sig { 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 } - def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(String) } - def fully_qualified_name; end - - sig { returns(T::Boolean) } - def keyword_init; end - - def keyword_init=(_arg0); end - - sig { returns(T::Array[Symbol]) } - def members; end - - def members=(_arg0); end - - sig { returns(String) } - def name; end - - def name=(_arg0); end - - sig { override.params(v: RBI::Printer).void } - def print_header(v); end -end - -class RBI::TEnum < ::RBI::Class - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TEnum).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - sig { 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 } - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(name: String).void } - def <<(name); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Boolean) } - def empty?; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.params(other: RBI::Node).void } - def merge_with(other); end - - sig { returns(T::Array[String]) } - def names; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::TStruct < ::RBI::Class - sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TStruct).void)).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - sig { 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 } - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void } - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { returns(T.nilable(String)) } - def default; end - - def default=(_arg0); end - - sig { abstract.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { returns(String) } - def name; end - - def name=(_arg0); end - def type; end - def type=(_arg0); end -end - -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - sig { 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 } - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(other: RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - sig { override.returns(T::Array[String]) } - def fully_qualified_names; end - - sig { override.returns(T::Array[String]) } - def index_ids; end - - sig { override.returns(String) } - def to_s; end -end - -class RBI::Tree < ::RBI::NodeWithComments - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(node: RBI::Node).void } - def <<(node); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - 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 - - sig { params(name: String, superclass_name: T.nilable(String), block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) } - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - sig { params(name: String, value: String).void } - def create_constant(name, value:); end - - sig { params(name: String).void } - def create_extend(name); end - - sig { params(name: String).void } - def create_include(name); end - - sig { params(name: String, parameters: T::Array[RBI::TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility).void } - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end - - sig { params(name: String).void } - def create_mixes_in_class_methods(name); end - - sig { params(name: String, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) } - def create_module(name, &block); end - - sig { params(constant: Module, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).void } - def create_path(constant, &block); end - - sig { params(name: String, value: String).void } - def create_type_member(name, value: T.unsafe(nil)); end - - sig { params(annotation: String).void } - def deannotate!(annotation); end - - sig { returns(T::Boolean) } - def empty?; end - - sig { void } - def group_nodes!; end - - sig { returns(RBI::Index) } - def index; end - - sig { params(other: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) } - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - sig { void } - def nest_non_public_methods!; end - - sig { void } - def nest_singleton_methods!; end - - sig { returns(T::Array[RBI::Node]) } - def nodes; end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { void } - def sort_nodes!; end - - private - - sig { params(node: RBI::Node).returns(RBI::Node) } - def create_node(node); end - - sig { returns(T::Hash[String, RBI::Node]) } - def nodes_cache; end - - sig { params(name: String).returns(T::Boolean) } - def valid_method_name?(name); end -end - -RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -class RBI::TreeBuilder < ::RBI::ASTVisitor - sig { params(file: String, comments: T::Array[Parser::Source::Comment], nodes_comments_assoc: T::Hash[Parser::Source::Map, T::Array[Parser::Source::Comment]]).void } - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - sig { void } - def post_process; end - - sig { returns(RBI::Tree) } - def tree; end - - sig { override.params(node: T.nilable(Object)).void } - def visit(node); end - - private - - sig { void } - def assoc_dangling_comments; end - - sig { returns(RBI::Tree) } - def current_scope; end - - sig { returns(T::Array[RBI::Sig]) } - def current_sigs; end - - sig { params(node: AST::Node).returns(T::Array[RBI::Comment]) } - def node_comments(node); end - - sig { params(node: AST::Node).returns(RBI::Loc) } - def node_loc(node); end - - sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) } - def parse_block(node); end - - sig { params(node: AST::Node).returns(RBI::Node) } - def parse_const_assign(node); end - - sig { params(node: AST::Node).returns(RBI::Method) } - def parse_def(node); end - - sig { params(node: AST::Node).returns(RBI::TEnumBlock) } - def parse_enum(node); end - - sig { params(node: AST::Node).returns(RBI::Param) } - def parse_param(node); end - - sig { params(node: AST::Node).returns(RBI::Scope) } - def parse_scope(node); end - - sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) } - def parse_send(node); end - - sig { params(node: AST::Node).returns(T::Array[RBI::Arg]) } - def parse_send_args(node); end - - sig { params(node: AST::Node).returns(RBI::Sig) } - def parse_sig(node); end - - sig { params(node: AST::Node).returns(RBI::Struct) } - def parse_struct(node); end - - sig { params(node: AST::Node).returns([String, String, T.nilable(String)]) } - def parse_tstruct_prop(node); end - - sig { void } - def separate_header_comments; end - - sig { void } - def set_root_tree_loc; end - - sig { params(node: AST::Node).returns(T::Boolean) } - def struct_definition?(node); end -end - -class RBI::TypeMember < ::RBI::NodeWithComments - sig { 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 } - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(String) } - def fully_qualified_name; end - - sig { returns(String) } - def name; end - - sig { override.returns(String) } - def to_s; end - - def value; end -end - -RBI::VERSION = T.let(T.unsafe(nil), String) - -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - 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 - - sig { params(other: RBI::Visibility).returns(T::Boolean) } - def ==(other); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Boolean) } - def private?; end - - sig { returns(T::Boolean) } - def protected?; end - - sig { returns(T::Boolean) } - def public?; end - - sig { returns(Symbol) } - def visibility; end -end - -class RBI::VisibilityGroup < ::RBI::Tree - sig { params(visibility: RBI::Visibility).void } - def initialize(visibility); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { returns(RBI::Visibility) } - def visibility; end -end - -class RBI::Visitor - abstract! - - def initialize(*args, **_arg1_arg1, &blk); end - - sig { abstract.params(node: T.nilable(RBI::Node)).void } - def visit(node); end - - sig { params(nodes: T::Array[RBI::Node]).void } - def visit_all(nodes); end -end diff --git a/sorbet/rbi/gems/rbi@0.3.13.rbi b/sorbet/rbi/gems/rbi@0.3.13.rbi new file mode 100644 index 00000000..dd7d020b --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.3.13.rbi @@ -0,0 +1,5519 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bundle exec spoom srb sigs export`. + +# pkg:gem/rbi#lib/rbi.rb:7 +module RBI; end + +# pkg:gem/rbi#lib/rbi/model.rb:862 +class RBI::Arg < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:867 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:873 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:878 + sig { returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:864 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:325 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:353 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:59 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:362 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:104 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:429 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:327 + sig { returns(T::Array[::Symbol]) } + def names; end + + # pkg:gem/rbi#lib/rbi/model.rb:333 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:343 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:338 + sig { returns(T::Boolean) } + def sigs?; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + def visibility=(_arg0); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:80 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:99 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @final + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:65 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } + def parse_sig; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:365 +class RBI::AttrAccessor < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:374 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:458 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:130 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:381 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:388 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:394 +class RBI::AttrReader < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:403 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:145 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:410 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:417 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:423 +class RBI::AttrWriter < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:432 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:450 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:155 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:439 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:446 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# pkg:gem/rbi#lib/rbi/model.rb:70 +class RBI::BlankLine < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:72 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:710 +class RBI::BlockParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:712 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:719 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:217 +class RBI::Class < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:230 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:388 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:239 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:219 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + def superclass_name=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:51 +class RBI::Comment < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:56 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:62 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + sig { returns(::String) } + def text; end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591 +class RBI::ConflictTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:599 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593 + sig { returns(::RBI::Tree) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596 + def right_name; end +end + +# Consts +# +# pkg:gem/rbi#lib/rbi/model.rb:296 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:301 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:309 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:94 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:317 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:358 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi.rb:8 +class RBI::Error < ::StandardError; end + +# pkg:gem/rbi#lib/rbi/model.rb:752 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:754 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:524 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:134 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:761 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:143 +class RBI::File + # pkg:gem/rbi#lib/rbi/model.rb:164 + sig do + params( + strictness: T.nilable(::String), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:172 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/model.rb:154 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:151 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # pkg:gem/rbi#lib/rbi/model.rb:159 + sig { returns(T::Boolean) } + def comments?; end + + # pkg:gem/rbi#lib/rbi/model.rb:177 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/printer.rb:877 + 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 + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1236 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1242 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + sig { returns(::RBI::Tree) } + def root; end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + def root=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + sig { returns(T.nilable(::String)) } + def strictness; end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + def strictness=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:883 + 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 + +# pkg:gem/rbi#lib/rbi/formatter.rb:5 +class RBI::Formatter + # pkg:gem/rbi#lib/rbi/formatter.rb:18 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_members: T::Boolean, + sort_nodes: T::Boolean, + replace_attributes_with_methods: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil), replace_attributes_with_methods: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:43 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:48 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + def max_line_length=(_arg0); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:37 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:86 +class RBI::Group < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:91 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:88 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:96 +class RBI::Group::Kind + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:111 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:103 +RBI::Group::Kind::Attrs = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:109 +RBI::Group::Kind::Consts = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:99 +RBI::Group::Kind::Helpers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:106 +RBI::Group::Kind::Inits = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:107 +RBI::Group::Kind::Methods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:101 +RBI::Group::Kind::MixesInClassMethods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:97 +RBI::Group::Kind::Mixins = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:98 +RBI::Group::Kind::RequiredAncestors = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:102 +RBI::Group::Kind::Sends = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:108 +RBI::Group::Kind::SingletonClasses = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:105 +RBI::Group::Kind::TEnums = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:104 +RBI::Group::Kind::TStructFields = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:100 +RBI::Group::Kind::TypeMembers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:5 +class RBI::GroupNodesError < ::RBI::Error; end + +# Sorbet's misc. +# +# pkg:gem/rbi#lib/rbi/model.rb:1187 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1192 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:540 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:164 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1189 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1200 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:738 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:740 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:516 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:124 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:747 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/index.rb:5 +class RBI::Index < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/index.rb:16 + sig { void } + def initialize; end + + # pkg:gem/rbi#lib/rbi/index.rb:27 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # pkg:gem/rbi#lib/rbi/index.rb:32 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # pkg:gem/rbi#lib/rbi/index.rb:22 + sig { returns(T::Array[::String]) } + def keys; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/index.rb:55 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # pkg:gem/rbi#lib/rbi/index.rb:8 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# @interface +# +# pkg:gem/rbi#lib/rbi/index.rb:69 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # @abstract + # + # pkg:gem/rbi#lib/rbi/index.rb:76 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:883 +class RBI::KwArg < ::RBI::Arg + # pkg:gem/rbi#lib/rbi/model.rb:888 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:894 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:885 + sig { returns(::String) } + def keyword; end + + # pkg:gem/rbi#lib/rbi/model.rb:899 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:678 +class RBI::KwOptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:683 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:691 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:680 + sig { returns(::String) } + def value; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:664 +class RBI::KwParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:666 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:673 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:696 +class RBI::KwRestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:698 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:705 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/loc.rb:5 +class RBI::Loc + # pkg:gem/rbi#lib/rbi/loc.rb:32 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def begin_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:20 + sig { returns(T.nilable(::String)) } + def file; end + + # pkg:gem/rbi#lib/rbi/loc.rb:41 + sig { params(other: ::RBI::Loc).returns(::RBI::Loc) } + def join(other); end + + # pkg:gem/rbi#lib/rbi/loc.rb:61 + sig { returns(T.nilable(::String)) } + def source; end + + # pkg:gem/rbi#lib/rbi/loc.rb:52 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/rbi#lib/rbi/loc.rb:8 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:342 +class RBI::MergeTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:351 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:344 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# pkg:gem/rbi#lib/rbi/model.rb:454 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:491 + sig do + params( + name: ::String, + params: T.nilable(T::Array[::RBI::Param]), + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:511 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:546 + sig { params(name: ::String).void } + def add_block_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:536 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:531 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:541 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:521 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:516 + sig { params(name: ::String).void } + def add_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:526 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:559 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:466 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:585 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:114 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + sig { returns(T::Boolean) } + def is_singleton; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + def is_singleton=(_arg0); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:476 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:456 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:459 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:470 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:480 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:475 + sig { returns(T::Boolean) } + def sigs?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:595 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + def visibility=(_arg0); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:498 + sig { params(other: ::RBI::Method).returns(T::Boolean) } + def at_most_one_side_anonymous?(other); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1231 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1238 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:532 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:144 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1245 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:727 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:732 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:508 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:729 + sig { returns(T::Array[::String]) } + def names; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:197 +class RBI::Module < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:202 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:396 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:210 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:199 + sig { returns(::String) } + def name; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:8 +class RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:16 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # Can `self` and `_other` be merged into a single definition? + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:302 + def compatible_with?(_other); end + + # pkg:gem/rbi#lib/rbi/model.rb:22 + sig { void } + def detach; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:308 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:311 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:44 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + def parent_tree=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:895 + 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 + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1251 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean + ).void + end + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1257 + sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:31 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:91 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # pkg:gem/rbi#lib/rbi/printer.rb:901 + 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 +# +# pkg:gem/rbi#lib/rbi/model.rb:88 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:105 + sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:111 + sig { returns(T::Array[::String]) } + def annotations; end + + # pkg:gem/rbi#lib/rbi/model.rb:93 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:90 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # Returns true if this node has any comments, without allocating + # an empty array for nodes that have never had comments set. + # + # pkg:gem/rbi#lib/rbi/model.rb:100 + sig { returns(T::Boolean) } + def comments?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:325 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:101 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:638 +class RBI::OptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:643 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:640 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:601 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:606 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:624 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:619 + sig { returns(T::Boolean) } + def anonymous?; end + + # pkg:gem/rbi#lib/rbi/model.rb:603 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:614 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:7 +class RBI::ParseError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:12 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:9 + sig { returns(::RBI::Loc) } + def location; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:49 +class RBI::Parser + # pkg:gem/rbi#lib/rbi/parser.rb:80 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:75 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:87 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # pkg:gem/rbi#lib/rbi/parser.rb:57 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:62 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # pkg:gem/rbi#lib/rbi/parser.rb:52 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # pkg:gem/rbi#lib/rbi/parser.rb:68 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:1003 +class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:1005 + sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } + def initialize(source, begin_offset, end_offset); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1036 + sig { returns(::Prism::Location) } + def location; end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1026 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1015 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:1047 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def handle_string_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:915 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:920 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:986 + sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) } + def allow_incompatible_override?(node, value); end + + # pkg:gem/rbi#lib/rbi/parser.rb:917 + sig { returns(::RBI::Sig) } + def current; end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:978 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:928 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:164 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:172 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:169 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # pkg:gem/rbi#lib/rbi/parser.rb:166 + sig { returns(::RBI::Tree) } + def tree; end + + # pkg:gem/rbi#lib/rbi/parser.rb:361 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:185 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:236 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:229 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:221 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:291 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:313 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:332 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:344 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # pkg:gem/rbi#lib/rbi/parser.rb:539 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # pkg:gem/rbi#lib/rbi/parser.rb:557 + sig { void } + def collect_orphan_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:580 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/parser.rb:585 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # pkg:gem/rbi#lib/rbi/parser.rb:592 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # pkg:gem/rbi#lib/rbi/parser.rb:604 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:666 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:699 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:673 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:765 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:774 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:822 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # pkg:gem/rbi#lib/rbi/parser.rb:859 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:873 + sig { void } + def separate_header_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:883 + sig { void } + def set_root_tree_loc; end + + # pkg:gem/rbi#lib/rbi/parser.rb:902 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_enum_value?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:897 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:114 +class RBI::Parser::Visitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:116 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:143 + sig { params(node: ::Prism::Node).returns(::Prism::Location) } + def adjust_prism_location_for_heredoc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:126 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:131 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:138 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:154 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def self?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:159 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_sig_without_runtime?(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:7 +class RBI::Printer < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/printer.rb:25 + sig do + params( + out: T.any(::IO, ::String, ::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 + + # pkg:gem/rbi#lib/rbi/printer.rb:19 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:48 + sig { returns(::String) } + def current_indent_string; end + + # pkg:gem/rbi#lib/rbi/printer.rb:43 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:38 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:22 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/printer.rb:16 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:54 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:76 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:60 + 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. + # + # pkg:gem/rbi#lib/rbi/printer.rb:69 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:84 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:98 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/printer.rb:720 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:678 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:688 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:694 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:779 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:749 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:712 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:849 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:489 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:280 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:263 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:269 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:275 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:160 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:408 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:180 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:139 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:654 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:253 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:421 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:623 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:607 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:415 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:495 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:393 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:386 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:401 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:315 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:617 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:426 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:174 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:371 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:456 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:450 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:444 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:118 + sig { override.params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:365 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:644 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:379 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:197 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:242 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:664 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:207 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:471 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:503 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:524 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:192 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:186 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:549 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:568 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:574 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:587 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:166 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:532 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:538 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:544 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:597 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:461 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:630 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:846 +RBI::Printer::EMPTY_MODIFIERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rbi#lib/rbi/printer.rb:10 +RBI::Printer::INDENT_CACHE = T.let(T.unsafe(nil), Array) + +# Pre-computed indentation strings to avoid allocating " " * indent on every line. +# +# pkg:gem/rbi#lib/rbi/printer.rb:9 +RBI::Printer::MAX_CACHED_INDENT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rbi#lib/rbi/printer.rb:5 +class RBI::PrinterError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:821 +class RBI::Private < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:823 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:813 +class RBI::Protected < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:815 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:802 +class RBI::Public < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:804 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# Shared default instance to avoid allocating a new Public on every Method/Attr creation. +# +# pkg:gem/rbi#lib/rbi/model.rb:810 +RBI::Public::DEFAULT = T.let(T.unsafe(nil), RBI::Public) + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:5 +module RBI::RBS; end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:6 +class RBI::RBS::MethodTypeTranslator + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:22 + sig { params(method: ::RBI::Method).void } + def initialize(method); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:19 + sig { returns(::RBI::Sig) } + def result; end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:29 + sig { params(type: ::RBS::MethodType).void } + def visit(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:101 + sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } + def translate_function_param(param, index); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:116 + sig { params(type: T.untyped).returns(::RBI::Type) } + def translate_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:43 + sig { params(type: ::RBS::Types::Block).void } + def visit_block_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:58 + sig { params(type: ::RBS::Types::Function).void } + def visit_function_type(type); end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:11 + sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) } + def translate(method, type); end + end +end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:7 +class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:6 +class RBI::RBS::TypeTranslator + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:39 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:123 + sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } + def translate_class_instance(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:131 + sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } + def translate_function(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:178 + sig { params(type_name: ::String).returns(::String) } + def translate_t_generic_type(type_name); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:111 + sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) } + def translate_type_alias(type); end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:33 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + end +end + +RBI::RBS::TypeTranslator::RbsType = T.type_alias { T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) } + +# A comment representing a RBS type prefixed with `#:` +# +# pkg:gem/rbi#lib/rbi/model.rb:78 +class RBI::RBSComment < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:80 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:5 +class RBI::RBSPrinter < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:30 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:15 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:49 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:44 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:21 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + sig { returns(T::Boolean) } + def positional_names; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + def positional_names=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:55 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:302 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def print_locs=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:400 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:417 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_inline(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:479 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_multiline(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:75 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:61 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:68 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:82 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:680 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:270 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:253 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:259 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:265 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:124 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:612 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:144 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:107 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:816 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:237 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:624 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:94 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:789 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:777 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:618 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:686 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:325 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:783 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:629 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:574 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:659 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:653 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:647 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:564 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:810 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:584 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:161 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:224 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:826 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:171 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:545 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:558 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:156 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:150 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:743 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:749 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:755 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:130 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:692 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:727 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:735 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:664 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:796 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:929 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:963 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:951 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:842 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:861 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:903 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:867 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:921 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:630 +class RBI::ReqParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:632 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 +end + +# pkg:gem/rbi#lib/rbi/model.rb:1250 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1255 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:154 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1252 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1262 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:650 +class RBI::RestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:652 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:659 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:5 +module RBI::Rewriters; end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:8 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:29 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:44 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:55 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:8 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:17 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:30 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:37 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:25 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:38 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:8 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:26 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:69 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:76 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:62 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:58 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:29 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:37 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:11 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:37 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:39 +class RBI::Rewriters::Merge + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:66 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:75 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:63 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:50 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:82 +class RBI::Rewriters::Merge::Conflict + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:90 + sig { params(left: ::RBI::Node, right: ::RBI::Node, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name:, right_name:); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + sig { returns(::RBI::Node) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + def right_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:98 + sig { returns(::String) } + def to_s; end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:258 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:261 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:267 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:290 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:40 +class RBI::Rewriters::Merge::Keep + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:45 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:42 +RBI::Rewriters::Merge::Keep::LEFT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:41 +RBI::Rewriters::Merge::Keep::NONE = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:43 +RBI::Rewriters::Merge::Keep::RIGHT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:103 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:108 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:105 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:121 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:181 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:198 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:205 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:186 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:217 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:24 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:32 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:53 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:50 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:75 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:69 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:103 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:121 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:94 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:61 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:126 +class RBI::Rewriters::RemoveKnownDefinitions::Operation + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:131 + sig { params(deleted_node: ::RBI::Node, duplicate_of: ::RBI::Node).void } + def initialize(deleted_node:, duplicate_of:); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + sig { returns(::RBI::Node) } + def deleted_node; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + def duplicate_of; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:137 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:71 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:92 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:43 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:104 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Translate all RBS signature comments to Sorbet RBI signatures +# +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:7 +class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:11 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:40 + sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) } + def extract_rbs_comments(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:67 + sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_attr_type(node, comment); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:59 + sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_method_type(node, comment); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:8 +class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:185 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:363 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:188 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:84 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:192 + 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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:622 +class RBI::ScopeConflict < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:630 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624 + sig { returns(::RBI::Scope) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627 + def right_name; end +end + +# Sends +# +# pkg:gem/rbi#lib/rbi/model.rb:831 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:839 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:847 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # pkg:gem/rbi#lib/rbi/model.rb:852 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:836 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:548 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:184 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:833 + sig { returns(::String) } + def method; end + + # pkg:gem/rbi#lib/rbi/model.rb:857 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# pkg:gem/rbi#lib/rbi/model.rb:906 +class RBI::Sig < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:964 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + allow_incompatible_override: T::Boolean, + allow_incompatible_override_visibility: T::Boolean, + without_runtime: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:996 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:1006 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1001 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # pkg:gem/rbi#lib/rbi/model.rb:928 + sig { returns(T::Boolean) } + def allow_incompatible_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:928 + def allow_incompatible_override=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:931 + sig { returns(T::Boolean) } + def allow_incompatible_override_visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:931 + def allow_incompatible_override_visibility=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:947 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # pkg:gem/rbi#lib/rbi/model.rb:947 + def checked=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:916 + sig { returns(T::Boolean) } + def is_abstract; end + + # pkg:gem/rbi#lib/rbi/model.rb:916 + def is_abstract=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:925 + sig { returns(T::Boolean) } + def is_final; end + + # pkg:gem/rbi#lib/rbi/model.rb:925 + def is_final=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:922 + sig { returns(T::Boolean) } + def is_overridable; end + + # pkg:gem/rbi#lib/rbi/model.rb:922 + def is_overridable=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:919 + sig { returns(T::Boolean) } + def is_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:919 + def is_override=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:908 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:913 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # pkg:gem/rbi#lib/rbi/model.rb:913 + def return_type=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:937 + sig { returns(T::Array[::String]) } + def type_params; end + + # pkg:gem/rbi#lib/rbi/model.rb:942 + sig { returns(T::Boolean) } + def type_params?; end + + # pkg:gem/rbi#lib/rbi/model.rb:934 + sig { returns(T::Boolean) } + def without_runtime; end + + # pkg:gem/rbi#lib/rbi/model.rb:934 + def without_runtime=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1015 +class RBI::SigParam < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:1023 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:1037 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1032 + sig { returns(T::Boolean) } + def anonymous?; end + + # pkg:gem/rbi#lib/rbi/model.rb:1017 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:1020 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:246 +class RBI::SingletonClass < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:248 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:255 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:260 +class RBI::Struct < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:277 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:404 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:287 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + sig { returns(T::Boolean) } + def keyword_init; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + def keyword_init=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + sig { returns(T::Array[::Symbol]) } + def members; end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + def members=(_arg0); end + + # pkg:gem/rbi#lib/rbi/model.rb:262 + sig { returns(::String) } + def name; end +end + +# Sorbet's T::Enum +# +# pkg:gem/rbi#lib/rbi/model.rb:1134 +class RBI::TEnum < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1136 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:1142 +class RBI::TEnumBlock < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:1144 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1151 + sig { override.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:214 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1157 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1162 +class RBI::TEnumValue < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1167 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumValue).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1174 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:224 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1164 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1180 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# pkg:gem/rbi#lib/rbi/model.rb:1046 +class RBI::TStruct < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1048 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:1078 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1086 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:564 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1093 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:194 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1100 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:1055 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:1066 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:556 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1063 + sig { returns(T.nilable(::String)) } + def default; end + + # pkg:gem/rbi#lib/rbi/model.rb:1063 + def default=(_arg0); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:1075 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # pkg:gem/rbi#lib/rbi/model.rb:1057 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:1060 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1060 + def type=(_arg0); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1105 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1113 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:572 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1120 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:204 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1127 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:120 +class RBI::Tree < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:125 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:132 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:63 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:46 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:38 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # pkg:gem/rbi#lib/rbi/model.rb:138 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:113 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:58 + sig { void } + def flatten_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:57 + sig { void } + def flatten_visibilities!; end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:80 + sig { void } + def group_nodes!; end + + # pkg:gem/rbi#lib/rbi/index.rb:62 + sig { returns(::RBI::Index) } + def index; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:336 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:52 + sig { void } + def nest_non_public_members!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:41 + sig { void } + def nest_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:60 + sig { void } + def nest_top_level_members!; end + + # pkg:gem/rbi#lib/rbi/model.rb:122 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:50 + sig { void } + def replace_attributes_with_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:115 + sig { void } + def sort_nodes!; end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:88 + sig { void } + def translate_rbs_sigs!; end +end + +# The base class for all RBI types. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:7 +class RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:993 + sig { void } + def initialize; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1064 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:1067 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1073 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "::T.nilable(String)" + # type.nilable.nilable.to_rbi # => "::T.nilable(String)" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1007 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # pkg:gem/rbi#lib/rbi/type.rb:1034 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "::T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1022 + sig { returns(::RBI::Type) } + def non_nilable; end + + # Returns a normalized version of the type. + # + # Normalized types are meant to be easier to process, not to read. + # For example, `T.any(TrueClass, FalseClass)` instead of `T::Boolean` or + # `T.any(String, NilClass)` instead of `T.nilable(String)`. + # + # This is the inverse of `#simplify`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1048 + sig { abstract.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1266 + sig { returns(::String) } + def rbs_string; end + + # Returns a simplified version of the type. + # + # Simplified types are meant to be easier to read, not to process. + # For example, `T::Boolean` instead of `T.any(TrueClass, FalseClass)` or + # `T.nilable(String)` instead of `T.any(String, NilClass)`. + # + # This is the inverse of `#normalize`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1060 + sig { abstract.returns(::RBI::Type) } + def simplify; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1079 + sig { abstract.returns(::String) } + def to_rbi; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1083 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # pkg:gem/rbi#lib/rbi/type.rb:929 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # pkg:gem/rbi#lib/rbi/type.rb:938 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # pkg:gem/rbi#lib/rbi/type.rb:854 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # pkg:gem/rbi#lib/rbi/type.rb:860 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # pkg:gem/rbi#lib/rbi/type.rb:866 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:910 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:946 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # pkg:gem/rbi#lib/rbi/type.rb:919 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # pkg:gem/rbi#lib/rbi/type.rb:872 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:980 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # pkg:gem/rbi#lib/rbi/type.rb:878 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # pkg:gem/rbi#lib/rbi/type.rb:972 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # pkg:gem/rbi#lib/rbi/type.rb:843 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:898 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents the module of another type like `T::Module[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:904 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) } + def t_module(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:966 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type alias like `MyTypeAlias`. + # + # pkg:gem/rbi#lib/rbi/type.rb:958 + sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) } + def type_alias(name, aliased_type); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:952 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # pkg:gem/rbi#lib/rbi/type.rb:884 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:890 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # pkg:gem/rbi#lib/rbi/type_parser.rb:322 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:309 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:294 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:96 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:56 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:73 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) } + def parse_constant_assignment(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:244 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:223 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:218 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:335 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:354 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:361 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:371 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:366 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_module?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:378 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:347 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_type_alias?(node); end + + # pkg:gem/rbi#lib/rbi/type.rb:987 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:420 +class RBI::Type::All < ::RBI::Type::Composite + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:429 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:449 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:423 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:462 +class RBI::Type::Any < ::RBI::Type::Composite + # pkg:gem/rbi#lib/rbi/type.rb:470 + sig { returns(T::Boolean) } + def nilable?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:476 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:496 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:465 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# pkg:gem/rbi#lib/rbi/type.rb:51 +class RBI::Type::Anything < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:54 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:66 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:72 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:60 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# pkg:gem/rbi#lib/rbi/type.rb:78 +class RBI::Type::AttachedClass < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:81 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:93 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:99 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:87 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# pkg:gem/rbi#lib/rbi/type.rb:105 +class RBI::Type::Boolean < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:108 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:120 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:126 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:114 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:242 +class RBI::Type::Class < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:247 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:254 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:266 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:272 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:260 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:244 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:314 +class RBI::Type::ClassOf < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:322 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:330 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:346 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:352 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:336 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:316 + sig { returns(::RBI::Type::Simple) } + def type; end + + # pkg:gem/rbi#lib/rbi/type.rb:319 + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:402 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:407 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:414 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:404 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# pkg:gem/rbi#lib/rbi/type_parser.rb:6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:547 +class RBI::Type::Generic < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:555 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:563 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:549 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:575 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:552 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:581 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:569 + sig { override.returns(::String) } + def to_rbi; end +end + +# The module of another type like `T::Module[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:278 +class RBI::Type::Module < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:283 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:290 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:302 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:308 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:296 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:280 + sig { returns(::RBI::Type) } + def type; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:358 +class RBI::Type::Nilable < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:363 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:382 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:388 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:376 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:360 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# pkg:gem/rbi#lib/rbi/type.rb:132 +class RBI::Type::NoReturn < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:135 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:147 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:153 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:141 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:743 +class RBI::Type::Proc < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:754 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:763 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:791 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:823 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:773 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # pkg:gem/rbi#lib/rbi/type.rb:751 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # pkg:gem/rbi#lib/rbi/type.rb:745 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # pkg:gem/rbi#lib/rbi/type.rb:748 + sig { returns(::RBI::Type) } + def proc_returns; end + + # pkg:gem/rbi#lib/rbi/type.rb:779 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:829 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:798 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:785 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# pkg:gem/rbi#lib/rbi/type.rb:159 +class RBI::Type::SelfType < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:162 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:174 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:180 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:168 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# pkg:gem/rbi#lib/rbi/type.rb:701 +class RBI::Type::Shape < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:706 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:713 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:729 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:735 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:719 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:703 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# pkg:gem/rbi#lib/rbi/type.rb:13 +class RBI::Type::Simple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:18 + sig { params(name: ::String).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:25 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:15 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:37 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:43 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:31 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:665 +class RBI::Type::Tuple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:670 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:677 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:689 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:695 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:683 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:667 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type alias that references another type by name like `MyTypeAlias`. +# +# pkg:gem/rbi#lib/rbi/type.rb:623 +class RBI::Type::TypeAlias < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:631 + sig { params(name: ::String, aliased_type: ::RBI::Type).void } + def initialize(name, aliased_type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:639 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:628 + sig { returns(::RBI::Type) } + def aliased_type; end + + # pkg:gem/rbi#lib/rbi/type.rb:625 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:651 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:657 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:645 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:587 +class RBI::Type::TypeParameter < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:592 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:599 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:589 + sig { returns(::Symbol) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:611 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:617 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:605 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# pkg:gem/rbi#lib/rbi/type.rb:186 +class RBI::Type::Untyped < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:189 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:201 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:207 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:195 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:6 +class RBI::Type::Visitor + # pkg:gem/rbi#lib/rbi/type_visitor.rb:10 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:112 + sig { params(type: ::RBI::Type::TypeAlias).void } + def visit_type_alias(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:7 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:213 +class RBI::Type::Void < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:216 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:228 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:234 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:222 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1205 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1210 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:1218 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:174 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1207 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1226 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1207 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:984 +class RBI::TypePrinter + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:989 + sig { params(max_line_length: T.nilable(::Integer)).void } + def initialize(max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:986 + sig { returns(::String) } + def string; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:995 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1117 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1127 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1062 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1087 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1046 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1194 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1105 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1051 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1201 + sig { params(type: ::RBI::Type::Module).void } + def visit_module(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1092 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1072 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1167 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1082 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1147 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1041 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1137 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1189 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1077 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1067 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1210 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:7 + sig { returns(::RBI::Node) } + def node; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:18 +class RBI::UnexpectedParserError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:23 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:20 + sig { returns(::RBI::Loc) } + def last_location; end + + # pkg:gem/rbi#lib/rbi/parser.rb:30 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/version.rb:5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:769 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:774 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:780 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:797 + sig { returns(T::Boolean) } + def private?; end + + # pkg:gem/rbi#lib/rbi/model.rb:792 + sig { returns(T::Boolean) } + def protected?; end + + # pkg:gem/rbi#lib/rbi/model.rb:787 + sig { returns(T::Boolean) } + def public?; end + + # pkg:gem/rbi#lib/rbi/model.rb:771 + sig { returns(::Symbol) } + def visibility; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:58 +class RBI::VisibilityGroup < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:63 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:60 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/visitor.rb:8 +class RBI::Visitor + abstract! + + # pkg:gem/rbi#lib/rbi/visitor.rb:10 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:108 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/visitor.rb:198 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:147 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:150 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:153 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:126 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:177 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:132 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:246 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:144 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:183 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:240 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:228 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:180 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:201 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:171 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:168 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:174 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:156 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:234 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:129 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:162 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:192 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:189 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:186 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:123 + sig { params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:159 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:237 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:165 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:249 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:195 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:204 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:207 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:135 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:138 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:219 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:222 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:225 + sig { params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:141 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:210 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:213 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:216 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:231 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:243 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/visitor.rb:5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rbs@4.0.2.rbi b/sorbet/rbi/gems/rbs@4.0.2.rbi new file mode 100644 index 00000000..fd7971e7 --- /dev/null +++ b/sorbet/rbi/gems/rbs@4.0.2.rbi @@ -0,0 +1,6908 @@ +# 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`. + + +# pkg:gem/rbs#lib/rbs/version.rb:3 +module RBS + class << self + # pkg:gem/rbs#lib/rbs.rb:80 + def logger; end + + # pkg:gem/rbs#lib/rbs.rb:77 + def logger_level; end + + # pkg:gem/rbs#lib/rbs.rb:89 + def logger_level=(level); end + + # pkg:gem/rbs#lib/rbs.rb:78 + def logger_output; end + + # pkg:gem/rbs#lib/rbs.rb:84 + def logger_output=(val); end + + # pkg:gem/rbs#lib/rbs.rb:94 + def print_warning; end + end +end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:4 +module RBS::AST; end + +# pkg:gem/rbs#lib/rbs/ast/annotation.rb:5 +class RBS::AST::Annotation + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/comment.rb:5 +class RBS::AST::Comment + # pkg:gem/rbs#lib/rbs/ast/comment.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:5 +module RBS::AST::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:423 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:426 + def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:434 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:440 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:442 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def old_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:6 +class RBS::AST::Declarations::Base; end + +# pkg:gem/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 + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:119 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:93 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:95 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:91 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:89 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:92 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:133 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:90 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:107 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:56 +class RBS::AST::Declarations::Class::Super + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:61 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:67 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:58 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:71 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:73 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:59 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:57 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:77 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:447 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:448 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:347 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:354 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:362 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:352 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:351 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:368 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:370 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:350 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:348 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:374 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:349 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:385 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:392 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:400 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:390 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:389 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:406 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:408 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:388 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:386 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:412 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:387 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:248 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:258 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:278 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:252 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:254 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:285 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:287 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:253 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:251 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:249 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:291 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:250 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:267 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:35 +module RBS::AST::Declarations::MixinHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:36 + def each_mixin(&block); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:147 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:197 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:220 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:193 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:195 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:228 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:230 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:192 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:191 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:189 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:194 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:234 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:190 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:207 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:148 +class RBS::AST::Declarations::Module::Self + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:153 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:159 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:150 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:163 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:165 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:151 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:149 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:169 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:177 + def to_s; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:459 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:460 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:9 +module RBS::AST::Declarations::NestedDeclarationHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:22 + def each_decl; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:10 + def each_member; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:304 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:312 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:321 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:308 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:310 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:328 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:330 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:309 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:305 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:334 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:307 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:306 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:5 +module RBS::AST::Directives; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:6 +class RBS::AST::Directives::Base; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:37 +class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:42 + def initialize(value:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:38 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:40 + def value; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:31 + def initialize(clauses:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def clauses; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:10 +class RBS::AST::Directives::Use::SingleClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:13 + def initialize(type_name:, new_name:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:20 +class RBS::AST::Directives::Use::WildcardClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:23 + def initialize(namespace:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def namespace; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:5 +module RBS::AST::Members; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:399 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:407 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:416 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:403 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:405 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:423 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:425 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:441 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:402 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:404 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:400 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:401 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:445 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:429 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:329 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:332 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:311 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:314 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:347 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:350 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:260 +module RBS::AST::Members::Attribute + # pkg:gem/rbs#lib/rbs/ast/members.rb:270 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:281 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:265 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:267 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:290 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:292 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:264 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:263 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:266 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:261 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:262 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:296 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:268 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:6 +class RBS::AST::Members::Base; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:159 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:162 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:173 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:176 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:230 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:233 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:215 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:218 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:145 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:148 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:365 +module RBS::AST::Members::LocationOnly + # pkg:gem/rbs#lib/rbs/ast/members.rb:368 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:372 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:376 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:378 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:366 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:55 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:66 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:49 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:51 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:75 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:77 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:81 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:47 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:50 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:46 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:52 + def overloading; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:89 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:48 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:85 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:106 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:93 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:53 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:10 +class RBS::AST::Members::MethodDefinition::Overload + # pkg:gem/rbs#lib/rbs/ast/members.rb:13 + def initialize(method_type:, annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:18 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:26 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:22 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:32 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:38 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:187 +module RBS::AST::Members::Mixin + # pkg:gem/rbs#lib/rbs/ast/members.rb:194 + def initialize(name:, args:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:202 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:190 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:189 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:192 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:206 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:210 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:191 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:188 + def name; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:245 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:248 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:391 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:394 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:383 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:386 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:121 +module RBS::AST::Members::Var + # pkg:gem/rbs#lib/rbs/ast/members.rb:127 + def initialize(name:, type:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:134 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:125 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:138 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:140 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:124 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:122 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:123 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:5 +module RBS::AST::Ruby; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:6 +module RBS::AST::Ruby::Annotations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:43 +class RBS::AST::Ruby::Annotations::AliasAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:46 + def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def keyword_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:53 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:7 +class RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:10 + def initialize(location, prefix_location); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:15 + def buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def prefix_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:356 +class RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:359 + def initialize(location:, prefix_location:, ampersand_location:, name_location:, colon_location:, question_location:, type_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def ampersand_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:370 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:384 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:388 + def optional?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def question_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:392 + def required?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:396 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def type_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:64 +class RBS::AST::Ruby::Annotations::ClassAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:65 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:82 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:85 + def initialize(location:, prefix_location:, annotations:, method_type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:91 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:100 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:322 +class RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:325 + def initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:334 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def star2_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:346 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:222 +class RBS::AST::Ruby::Annotations::InstanceVariableAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:225 + def initialize(location:, prefix_location:, ivar_name:, ivar_name_location:, colon_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:234 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:246 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:109 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:114 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:, dot3_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def dot3_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:121 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:132 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def vertical_bar_locations; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:110 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:73 +class RBS::AST::Ruby::Annotations::ModuleAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:74 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:23 + def initialize(location:, prefix_location:, type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:28 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:21 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:35 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:256 +class RBS::AST::Ruby::Annotations::ParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:259 + def initialize(location:, prefix_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:267 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:278 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:155 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:164 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:158 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:162 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:172 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:156 + def return_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:160 + def return_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:183 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:141 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:144 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def skip_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:150 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:288 +class RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:291 + def initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:300 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def star_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:312 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:192 +class RBS::AST::Ruby::Annotations::TypeApplicationAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:195 + def initialize(location:, prefix_location:, type_args:, close_bracket_location:, comma_locations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def close_bracket_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def comma_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:202 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:214 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:6 +class RBS::AST::Ruby::CommentBlock + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:9 + def initialize(source_buffer, comments); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:226 + def as_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def comment_buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:211 + def comments; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def each_paragraph(variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:50 + def end_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:36 + def leading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:215 + def leading_annotation?(index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:174 + def line_location(start_line, end_line); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:54 + def line_starts; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:180 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def offsets; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:187 + def parse_annotation_lines(start_line, end_line, variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:46 + def start_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:169 + def text(comment_index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:41 + def trailing?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:197 + def trailing_annotation(variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:130 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:110 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:60 + def build(buffer, comments); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def error; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def error=(_); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def location=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:96 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:6 +module RBS::AST::Ruby::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:13 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:74 + def initialize(buffer, name, node, super_class); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:66 + def class_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:82 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:68 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:98 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:70 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:72 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:102 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:92 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:19 +class RBS::AST::Ruby::Declarations::ClassDecl::SuperClass + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:28 + def initialize(type_name_location, operator_location, type_name, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:56 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:55 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:22 + def operator_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:26 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:35 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:58 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:24 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:20 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:223 +class RBS::AST::Ruby::Declarations::ClassModuleAliasDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:230 + def initialize(buffer, node, new_name, infered_old_name, leading_comment, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:228 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:264 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:227 + def infered_old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:225 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:239 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:243 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:226 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:224 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:252 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:268 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:161 +class RBS::AST::Ruby::Declarations::ConstantDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:167 + def initialize(buffer, constant_name, node, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:209 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:163 + def constant_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:162 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:175 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:179 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:164 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:188 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:165 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:213 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:114 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:121 + def initialize(buffer, name, node); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:128 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:142 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:117 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:115 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:146 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:119 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:140 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:150 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:138 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:6 +module RBS::AST::Ruby::Helpers; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:7 +module RBS::AST::Ruby::Helpers::LocationHelper + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:8 + def rbs_location(location); end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:6 +module RBS::AST::Ruby::Members; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:690 +class RBS::AST::Ruby::Members::AttrAccessorMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:684 +class RBS::AST::Ruby::Members::AttrReaderMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:687 +class RBS::AST::Ruby::Members::AttrWriterMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:639 +class RBS::AST::Ruby::Members::AttributeMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:645 + def initialize(buffer, node, name_nodes, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:643 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:659 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:663 + def name_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:641 + def name_nodes; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:653 + def names; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:640 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:669 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:642 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:673 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:10 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:547 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:555 + def initialize(buffer, name, node, method_type, leading_comment); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:575 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:553 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:563 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:552 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:550 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:579 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:551 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:571 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:567 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:583 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:548 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:633 +class RBS::AST::Ruby::Members::ExtendMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:630 +class RBS::AST::Ruby::Members::IncludeMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:693 +class RBS::AST::Ruby::Members::InstanceVariableMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:696 + def initialize(buffer, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:694 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:709 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:701 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:705 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:713 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:403 + def initialize(type_annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:484 + def empty?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:407 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:524 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:488 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:401 + def type_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:535 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:420 + def build(leading_block, trailing_block, variables, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:29 + def initialize; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:181 + def all_param_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:196 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:287 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:25 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:21 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:24 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:20 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:23 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:273 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:41 + def build(param_type_annotations, return_type_annotation, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:593 +class RBS::AST::Ruby::Members::MixinMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:598 + def initialize(buffer, node, module_name, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:596 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:605 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:595 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:609 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:594 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:616 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:620 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:636 +class RBS::AST::Ruby::Members::PrependMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:5 +class RBS::AST::TypeParam + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:8 + def initialize(name:, variance:, upper_bound:, lower_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:41 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def default_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:51 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:25 + def lower_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def lower_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:69 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:57 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:133 + def to_s; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:32 + def unchecked!(value = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:37 + def unchecked?; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:18 + def upper_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def upper_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def variance; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:166 + def application(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:198 + def normalize_args(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:114 + def rename(params, new_names:); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:92 + def resolve_variables(params); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:102 + def subst_var(vars, type); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:219 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# pkg:gem/rbs#lib/rbs/ast/visitor.rb:26 +class RBS::AST::Visitor + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:27 + def visit(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:70 + def visit_all(nodes); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:79 + def visit_declaration_class(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:87 + def visit_declaration_constant(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:76 + def visit_declaration_global(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:93 + def visit_declaration_interface(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:83 + def visit_declaration_module(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:90 + def visit_declaration_type_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:97 + def visit_member_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:124 + def visit_member_attr_accessor(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:118 + def visit_member_attr_reader(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:121 + def visit_member_attr_writer(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:100 + def visit_member_class_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:103 + def visit_member_class_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:133 + def visit_member_extend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:127 + def visit_member_include(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:106 + def visit_member_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:115 + def visit_member_method_definition(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:130 + def visit_member_prepend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:109 + def visit_member_private(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:112 + def visit_member_public(node); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:4 +class RBS::AncestorGraph + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:9 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:19 + def build; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:32 + def build_ancestors(node, ancestors); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:11 + def children; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:56 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:48 + def each_parent(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:8 + def env; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:10 + def parents; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:43 + def register(parent:, child:); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 +class RBS::AncestorGraph::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 +class RBS::AncestorGraph::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:19 +class RBS::BaseError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/buffer.rb:4 +class RBS::Buffer + # pkg:gem/rbs#lib/rbs/buffer.rb:9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:131 + def absolute_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:6 + def content; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:148 + def detach; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:86 + def inspect; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:78 + def last_position; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:26 + def line_count; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:22 + def lines; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:68 + def loc_to_pos(loc); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:7 + def parent; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:116 + def parent_buffer; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:122 + def parent_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:56 + def pos_to_loc(pos); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:30 + def ranges; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:90 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:98 + def sub_buffer(lines:); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:140 + def top_buffer; end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:4 +module RBS::BuiltinNames; end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:5 +class RBS::BuiltinNames::Name + # pkg:gem/rbs#lib/rbs/builtin_names.rb:8 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:16 + def instance_type(*args); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:20 + def instance_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:24 + def singleton_type; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:28 + def singleton_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:12 + def to_s; end + + class << self + # pkg:gem/rbs#lib/rbs/builtin_names.rb:32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:4 +class RBS::CLI; end + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:5 +class RBS::CLI::ColoredIO + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:8 + def initialize(stdout:); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:28 + def puts(*_arg0, **_arg1, &_arg2); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:20 + def puts_green(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:12 + def puts_red(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:6 + def stdout; end + + private + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:43 + def are_colors_disabled?; end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:35 + def can_display_colors?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:345 +class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:346 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:4 +module RBS::Collection; end + +# pkg:gem/rbs#lib/rbs/collection/cleaner.rb:5 +class RBS::Collection::Cleaner + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:8 + def initialize(lockfile_path:); end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:12 + def clean; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:6 + def lock; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# pkg:gem/rbs#lib/rbs/collection/config.rb:7 +class RBS::Collection::Config + # pkg:gem/rbs#lib/rbs/collection/config.rb:49 + def initialize(data, config_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:54 + def gem(gem_name); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:74 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:58 + def repo_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:62 + def repo_path_data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:66 + def sources; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config.rb:21 + def find_config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # pkg:gem/rbs#lib/rbs/collection/config.rb:34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:45 + def to_lockfile_path(config_path); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config.rb:8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config.rb:9 + def initialize; end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:6 +class RBS::Collection::Config::Lockfile + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:73 + def check_rbs_availability!; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:18 + def fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:22 + def gemfile_lock_fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gemfile_lock_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:65 + def library_data(lib); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_dir; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def sources; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:28 + def to_lockfile; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:6 +class RBS::Collection::Config::LockfileGenerator + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:48 + def initialize(config:, definition:, with_lockfile:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def config; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def definition; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def existing_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def gem_entries; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def gem_hash; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:76 + def generate; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:40 + def lockfile; end + + private + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:109 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:175 + def assign_stdlib(name:, from_gem: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:246 + def find_best_version(version:, versions:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:240 + def find_source(name:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:101 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:42 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:7 +RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:24 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:25 + def initialize(expected:, actual:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:30 + def message; end +end + +# pkg:gem/rbs#lib/rbs/collection/config.rb:17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/collection/installer.rb:5 +class RBS::Collection::Installer + # pkg:gem/rbs#lib/rbs/collection/installer.rb:9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:14 + def install_from_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:6 + def lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:7 + def stdout; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:5 +module RBS::Collection::Sources + class << self + # pkg:gem/rbs#lib/rbs/collection/sources.rb:12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:6 +module RBS::Collection::Sources::Base + # pkg:gem/rbs#lib/rbs/collection/sources/base.rb:7 + def dependencies_of(name, version); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:11 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:19 + def initialize(name:, revision:, remote:, repo_dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:27 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:44 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:224 + def load_metadata(dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:74 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:208 + def metadata_content(name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def name; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def remote; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:173 + def resolved_revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:114 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:37 + def versions(name); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:216 + def write_metadata(dir:, name:, version:); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:88 + def _install(dest:, name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:184 + def commit_hash?; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:100 + def cp_r(src, dest); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:124 + def format_config_entry(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:169 + def gem_repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:230 + def gems_versions; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:188 + def git(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:192 + def git?(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:159 + def git_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:153 + def need_to_fetch?(revision); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:131 + def setup!; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:198 + def sh!(*cmd, **opt); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:15 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:13 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/collection/sources/local.rb:6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:11 + def initialize(path:, base_directory:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def full_path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:32 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:64 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:72 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:25 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:59 + def _install(src, dst); end +end + +# Signatures that are included in gem package as sig/ directory. +# +# pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:13 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:36 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:17 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:42 + def gem_sig_path(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:15 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:38 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:19 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:44 + def lookup(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# pkg:gem/rbs#lib/rbs/constant.rb:4 +class RBS::Constant + # pkg:gem/rbs#lib/rbs/constant.rb:9 + def initialize(name:, type:, entry:); end + + # pkg:gem/rbs#lib/rbs/constant.rb:15 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:7 + def entry; end + + # pkg:gem/rbs#lib/rbs/constant.rb:22 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:24 + def hash; end + + # pkg:gem/rbs#lib/rbs/constant.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/constant.rb:6 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:598 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:603 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:601 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:609 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:559 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:564 + def initialize(type_name:, method_name:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:4 +class RBS::Definition + # pkg:gem/rbs#lib/rbs/definition.rb:302 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:296 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:325 + def class?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:342 + def class_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:300 + def class_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:389 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:295 + def entry; end + + # pkg:gem/rbs#lib/rbs/definition.rb:346 + def instance_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:299 + def instance_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:333 + def interface?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:350 + def interface_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:379 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:298 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition.rb:329 + def module?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:297 + def self_type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:367 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:294 + def type_name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:354 + def type_params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:358 + def type_params_decl; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:209 +module RBS::Definition::Ancestor; end + +# pkg:gem/rbs#lib/rbs/definition.rb:210 +class RBS::Definition::Ancestor::Instance + # pkg:gem/rbs#lib/rbs/definition.rb:213 + def initialize(name:, args:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:219 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def args; end + + # pkg:gem/rbs#lib/rbs/definition.rb:223 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:225 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def source; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:230 +class RBS::Definition::Ancestor::Singleton + # pkg:gem/rbs#lib/rbs/definition.rb:233 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:237 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:241 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:243 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:231 + def name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:249 +class RBS::Definition::InstanceAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:254 + def initialize(type_name:, params:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:252 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:260 + def apply(args, env:, location:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:251 + def params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:250 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:30 +class RBS::Definition::Method + # pkg:gem/rbs#lib/rbs/definition.rb:107 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:117 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:101 + def accessibility; end + + # pkg:gem/rbs#lib/rbs/definition.rb:105 + def alias_member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:104 + def alias_of; end + + # pkg:gem/rbs#lib/rbs/definition.rb:103 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:151 + def comments; end + + # pkg:gem/rbs#lib/rbs/definition.rb:133 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:100 + def defs; end + + # pkg:gem/rbs#lib/rbs/definition.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:102 + def extra_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:140 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:190 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:176 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:183 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:155 + def members; end + + # pkg:gem/rbs#lib/rbs/definition.rb:147 + def method_types; end + + # pkg:gem/rbs#lib/rbs/definition.rb:163 + def private?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:159 + def public?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:167 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:99 + def super_method; end + + # pkg:gem/rbs#lib/rbs/definition.rb:196 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:31 +class RBS::Definition::Method::TypeDef + # pkg:gem/rbs#lib/rbs/definition.rb:40 + def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:50 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:38 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:64 + def comment; end + + # pkg:gem/rbs#lib/rbs/definition.rb:34 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:89 + def each_annotation(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:58 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:60 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:35 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:33 + def member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:36 + def member_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:80 + def overload?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:37 + def overload_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:32 + def type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:73 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:284 +class RBS::Definition::SingletonAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:288 + def initialize(type_name:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:286 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:285 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:5 +class RBS::Definition::Variable + # pkg:gem/rbs#lib/rbs/definition.rb:11 + def initialize(parent_variable:, type:, declared_in:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:8 + def declared_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:6 + def parent_variable; end + + # pkg:gem/rbs#lib/rbs/definition.rb:9 + def source; end + + # pkg:gem/rbs#lib/rbs/definition.rb:18 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:7 + def type; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder.rb:4 +class RBS::DefinitionBuilder + # pkg:gem/rbs#lib/rbs/definition_builder.rb:14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:6 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:195 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:43 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:327 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # pkg:gem/rbs#lib/rbs/definition_builder.rb:257 + def build_singleton0(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:85 + def define_instance(definition, type_name, subst, define_class_vars:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:33 + def define_interface(definition, type_name, subst); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:695 + def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:25 + def ensure_namespace!(namespace, location:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:983 + def expand_alias(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:987 + def expand_alias1(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:994 + def expand_alias2(type_name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:634 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:583 + def insert_variable(type_name, variables, name:, type:, source:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:9 + def instance_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:12 + def interface_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:453 + def interface_methods(interface_ancestors); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:7 + def method_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:11 + def singleton0_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:10 + def singleton_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:483 + def source_location(source, decl); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:973 + def special_accessibility(is_instance, method_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:66 + def tapp_subst(name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:979 + def try_cache(type_name, cache:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1018 + def update(env:, except:, ancestor_builder:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:473 + def validate_params_with(type_params, result:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1047 + def validate_type_name(name, location); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:501 + def validate_type_params(definition, ancestors:, methods:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1036 + def validate_type_presence(type); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:594 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:5 +class RBS::DefinitionBuilder::AncestorBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:162 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:151 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:664 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:492 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:154 + def instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:628 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:160 + def interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:474 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:350 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:192 + def one_instance_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:153 + def one_instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:331 + def one_interface_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:159 + def one_interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:277 + def one_singleton_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:156 + def one_singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:573 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:157 + def singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:175 + def validate_super_class!(type_name, entry); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # pkg:gem/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 + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:29 + def each_ancestor(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:86 + def each_extended_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:78 + def each_extended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:62 + def each_included_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:54 + def each_included_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:70 + def each_prepended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:46 + def each_self_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:15 + def extended_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:14 + def extended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:12 + def included_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:11 + def included_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:8 + def params; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:13 + def prepended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:10 + def self_types; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:9 + def super_class; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:7 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:94 + def class_instance(type_name:, params:, super_class:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:136 + def interface(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:122 + def module_instance(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:108 + def singleton(type_name:, super_class:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:5 +class RBS::DefinitionBuilder::MethodBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:91 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:211 + def build_alias(methods, type, member:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:216 + def build_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:99 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:191 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:250 + def build_method(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:232 + def build_ruby_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:162 + def build_singleton(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:261 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:86 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:87 + def instance_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:89 + def interface_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:88 + def singleton_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:274 + def update(env:, except:); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:30 + def initialize(type:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:49 + def each; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:28 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:27 + def type; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:35 + def validate!; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:14 + def accessibility; end + + # @implements Definition + # + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:10 + def original; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:22 + def empty(name:, type:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:68 + def initialize(methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:66 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:76 + def tsort_each_child(defn); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:72 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# pkg:gem/rbs#lib/rbs/errors.rb:23 +module RBS::DetailedMessageable + # pkg:gem/rbs#lib/rbs/errors.rb:24 + def detailed_message(highlight: T.unsafe(nil), **_arg1); end +end + +# pkg:gem/rbs#lib/rbs/diff.rb:4 +class RBS::Diff + # pkg:gem/rbs#lib/rbs/diff.rb:5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/diff.rb:13 + def each_diff(&block); end + + private + + # pkg:gem/rbs#lib/rbs/diff.rb:96 + def build_builder(env); end + + # pkg:gem/rbs#lib/rbs/diff.rb:77 + def build_env(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:49 + def build_methods(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:122 + def constant_to_s(constant); end + + # pkg:gem/rbs#lib/rbs/diff.rb:100 + def definition_method_to_s(key, kind, definition_method); end + + # pkg:gem/rbs#lib/rbs/diff.rb:38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # pkg:gem/rbs#lib/rbs/diff.rb:27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:419 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:423 + def initialize(name, *decls); end + + # pkg:gem/rbs#lib/rbs/errors.rb:421 + def decls; end + + # pkg:gem/rbs#lib/rbs/errors.rb:420 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:292 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:299 + def initialize(type:, method_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:307 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:297 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:296 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:311 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:295 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:320 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:251 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:258 + def initialize(type:, method_name:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:283 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:256 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:255 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:287 + def other_locations; end + + # pkg:gem/rbs#lib/rbs/errors.rb:270 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:254 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:279 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:4 +class RBS::Environment + # pkg:gem/rbs#lib/rbs/environment.rb:48 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment.rb:981 + def absolute_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:976 + def absolute_type_name(resolver, map, type_name, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:455 + def add_source(source); end + + # pkg:gem/rbs#lib/rbs/environment.rb:568 + def append_context(context, decl); end + + # pkg:gem/rbs#lib/rbs/environment.rb:992 + def buffers; end + + # pkg:gem/rbs#lib/rbs/environment.rb:117 + def class_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:10 + def class_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:101 + def class_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:5 + def class_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:125 + def class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:97 + def constant_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:8 + def constant_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:167 + def constant_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:93 + def constant_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:14 + def declarations; end + + # pkg:gem/rbs#lib/rbs/environment.rb:470 + def each_rbs_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:482 + def each_ruby_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:9 + def global_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:277 + def insert_rbs_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:374 + def insert_ruby_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:987 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment.rb:6 + def interface_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:75 + def interface_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:109 + def module_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:154 + def module_class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:105 + def module_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:132 + def module_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:83 + def module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:269 + def normalize_module_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:273 + def normalize_module_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:241 + def normalize_module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:219 + def normalize_type_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:206 + def normalize_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:187 + def normalize_type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:139 + def normalized_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:163 + def normalized_module_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:150 + def normalized_module_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:236 + def normalized_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:223 + def normalized_type_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:577 + def resolve_declaration(resolver, map, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:862 + def resolve_member(resolver, map, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:962 + def resolve_method_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:713 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:790 + def resolve_ruby_member(resolver, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:500 + def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:522 + def resolve_type_names(only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:970 + def resolve_type_params(resolver, map, params, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:562 + def resolver_context(*nesting); end + + # pkg:gem/rbs#lib/rbs/environment.rb:12 + def sources; end + + # pkg:gem/rbs#lib/rbs/environment.rb:7 + def type_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:79 + def type_alias_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:87 + def type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:996 + def unload(paths); end + + # pkg:gem/rbs#lib/rbs/environment.rb:494 + def validate_type_params; end + + private + + # pkg:gem/rbs#lib/rbs/environment.rb:59 + def initialize_copy(other); end + + class << self + # pkg:gem/rbs#lib/rbs/environment.rb:69 + def from_loader(loader); end + end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:33 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/class_entry.rb:5 +class RBS::Environment::ClassEntry + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:21 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:31 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:35 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:47 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:52 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:45 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:36 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:30 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/module_entry.rb:5 +class RBS::Environment::ModuleEntry + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:20 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:30 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:34 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:43 + def self_types; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:38 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:49 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:18 +class RBS::Environment::SingleEntry + # pkg:gem/rbs#lib/rbs/environment.rb:23 + def initialize(name:, decl:, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:20 + def context; end + + # pkg:gem/rbs#lib/rbs/environment.rb:21 + def decl; end + + # pkg:gem/rbs#lib/rbs/environment.rb:19 + def name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:39 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:5 +class RBS::Environment::UseMap + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:30 + def initialize(table:); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:36 + def build_map(clause); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:72 + def resolve(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:53 + def resolve?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:28 + def use_dirs; end +end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:6 +class RBS::Environment::UseMap::Table + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:9 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:14 + def compute_children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def known_types; end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:40 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:48 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:74 + def add_collection(lockfile); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:20 + def core_root; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:24 + def dirs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:125 + def each_dir; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:148 + def each_signature; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:98 + def has_library?(library:, version:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:23 + def libs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:106 + def load(env:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:21 + def repository; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:59 + def resolve_dependencies(library:, version:); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_loader.rb:28 + def gem_sig_path(name, version); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:26 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:17 +class RBS::EnvironmentLoader::Library < ::Struct; end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # pkg:gem/rbs#lib/rbs/environment_loader.rb:8 + def initialize(lib:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:6 + def library; end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:4 +class RBS::EnvironmentWalker + include ::TSort + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:11 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:16 + def builder; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:99 + def each_type_name(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:105 + def each_type_node(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:9 + def env; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:20 + def only_ancestors!(only = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:25 + def only_ancestors?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:44 + def tsort_each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:31 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/factory.rb:4 +class RBS::Factory + # pkg:gem/rbs#lib/rbs/factory.rb:5 + def type_name(string); end +end + +# pkg:gem/rbs#lib/rbs/file_finder.rb:4 +module RBS::FileFinder + class << self + # pkg:gem/rbs#lib/rbs/file_finder.rb:7 + def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:407 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:411 + def initialize(name:, decl:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/errors.rb:409 + def decl; end + + # pkg:gem/rbs#lib/rbs/errors.rb:408 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:574 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:579 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:577 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:593 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:187 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:192 + def initialize(super_decl); end + + # pkg:gem/rbs#lib/rbs/errors.rb:198 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:190 + def super_decl; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:202 + def check!(super_decl, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:4 +class RBS::InlineParser + class << self + # pkg:gem/rbs#lib/rbs/inline_parser.rb:45 + def parse(buffer, prism); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:5 +class RBS::InlineParser::CommentAssociation + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:8 + def initialize(blocks); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def associated_blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:84 + def each_enclosed_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:104 + def each_unassociated_block; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def end_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:47 + def leading_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:55 + def leading_block!(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def start_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:63 + def trailing_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:76 + def trailing_block!(node); end + + class << self + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:24 + def build(buffer, result); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:29 +class RBS::InlineParser::CommentAssociation::Reference + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:32 + def initialize(block, association); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:37 + def associate!; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:42 + def associated?; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:30 + def block; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:20 +module RBS::InlineParser::Diagnostic; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:38 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:41 +class RBS::InlineParser::Diagnostic::AttributeNonSymbolName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:21 +class RBS::InlineParser::Diagnostic::Base + # pkg:gem/rbs#lib/rbs/inline_parser.rb:24 + def initialize(location, message); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def location; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def message; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:42 +class RBS::InlineParser::Diagnostic::ClassModuleAliasDeclarationMissingTypeName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:39 +class RBS::InlineParser::Diagnostic::MixinMultipleArguments < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:40 +class RBS::InlineParser::Diagnostic::MixinNonConstantModule < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:31 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:36 +class RBS::InlineParser::Diagnostic::NonConstantConstantDeclaration < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:32 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:33 +class RBS::InlineParser::Diagnostic::NonConstantSuperClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:30 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:35 +class RBS::InlineParser::Diagnostic::TopLevelAttributeDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:34 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:37 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:57 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:63 + def initialize(result); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:69 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def comments; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:73 + def current_module; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:77 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:81 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:472 + def insert_declaration(decl); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def module_nesting; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:315 + def parse_attribute_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:375 + def parse_constant_declaration(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:259 + def parse_mixin_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:508 + def parse_super_class(super_class_expr, inheritance_operator_loc); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:85 + def push_module_nesting(mod); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:480 + def report_unused_annotation(*annotations); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:495 + def report_unused_block(block); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:92 + def skip_node?(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:217 + def visit_call_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:103 + def visit_class_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:253 + def visit_constant_path_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:246 + def visit_constant_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:178 + def visit_def_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:156 + def visit_module_node(node); end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:5 +class RBS::InlineParser::Result + # pkg:gem/rbs#lib/rbs/inline_parser.rb:8 + def initialize(buffer, prism); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def prism_result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:15 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:341 +class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:342 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:378 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:386 + def initialize(type_name:, method_name:, kind:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:383 + def kind; end + + # pkg:gem/rbs#lib/rbs/errors.rb:402 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:384 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:382 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:381 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:67 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:74 + def initialize(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:69 + def args; end + + # pkg:gem/rbs#lib/rbs/errors.rb:72 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:70 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:68 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:71 + def type_params; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:83 + def check!(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:92 + def check2!(env:, type_name:, args:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:432 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:439 + def initialize(type_name:, param:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:437 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:436 + def param; end + + # pkg:gem/rbs#lib/rbs/errors.rb:435 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:20 +class RBS::LoadingError < ::RBS::BaseError; end + +# pkg:gem/rbs#lib/rbs.rb:71 +class RBS::Location + # pkg:gem/rbs#lib/rbs.rb:71 + def initialize(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:79 + def ==(other); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def [](_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_optional_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_optional_no_child(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _add_required_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _end_pos; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _optional_keys; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _required_keys; end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:110 + def add_optional_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:106 + def add_required_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:27 + def aref(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def buffer; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:118 + def each_optional_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:126 + def each_required_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:55 + def end_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:51 + def end_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:63 + def end_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:35 + def end_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:134 + def key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:146 + def local_location; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:166 + def local_source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:39 + def name; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:138 + def optional_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:67 + def range; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:142 + def required_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:71 + def source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:47 + def start_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:43 + def start_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:59 + def start_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:31 + def start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:86 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:75 + def to_s; end + + private + + # pkg:gem/rbs#lib/rbs.rb:71 + def initialize_copy(_arg0); end + + class << self + # pkg:gem/rbs#lib/rbs/location_aux.rb:16 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:102 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/location_aux.rb:29 +RBS::Location::WithChildren = RBS::Location + +# pkg:gem/rbs#lib/rbs/locator.rb:4 +class RBS::Locator + # pkg:gem/rbs#lib/rbs/locator.rb:7 + def initialize(buffer:, dirs:, decls:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def buffer; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def decls; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def dirs; end + + # pkg:gem/rbs#lib/rbs/locator.rb:13 + def find(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:29 + def find2(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:60 + def find_in_decl(pos, decl:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:42 + def find_in_directive(pos, dir, array); end + + # pkg:gem/rbs#lib/rbs/locator.rb:212 + def find_in_loc(pos, location:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:131 + def find_in_member(pos, member:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:154 + def find_in_method_type(pos, method_type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:196 + def find_in_type(pos, type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:172 + def find_in_type_param(pos, type_param:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:239 + def test_loc(pos, location:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:4 +module RBS::MethodNameHelper + # pkg:gem/rbs#lib/rbs/errors.rb:5 + def method_name_string; end +end + +# pkg:gem/rbs#lib/rbs/method_type.rb:4 +class RBS::MethodType + # pkg:gem/rbs#lib/rbs/method_type.rb:10 + def initialize(type_params:, type:, block:, location:); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:17 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:7 + def block; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:86 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:59 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:127 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:123 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:65 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:74 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:33 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:24 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:100 + def to_s; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:119 + def type_param_names; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:5 + def type_params; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:50 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:131 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:468 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:474 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:481 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:472 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:471 + def type_name; end + + private + + # pkg:gem/rbs#lib/rbs/errors.rb:502 + def member_name(member); end + + # pkg:gem/rbs#lib/rbs/errors.rb:513 + def mixin_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:485 + def check!(type_name:, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/namespace.rb:4 +class RBS::Namespace + # pkg:gem/rbs#lib/rbs/namespace.rb:7 + def initialize(path:, absolute:); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:20 + def +(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:59 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:47 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:39 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:28 + def append(component); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:101 + def ascend; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:55 + def empty?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:63 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:65 + def hash; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:32 + def parent; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:5 + def path; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:51 + def relative!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:43 + def relative?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:69 + def split; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:75 + def to_s; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:84 + def to_type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/namespace.rb:12 + def empty; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:93 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:16 + def root; end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:229 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:235 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:242 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:233 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:232 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:246 + def check!(type_name, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:210 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:216 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:214 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:213 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:223 + def check!(self_type, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:167 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:171 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:169 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:168 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:178 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:148 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:154 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:152 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:151 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:161 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:545 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:551 + def initialize(diagnostic:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:548 + def diagnostic; end + + # pkg:gem/rbs#lib/rbs/errors.rb:549 + def location; end +end + +# pkg:gem/rbs#lib/rbs.rb:71 +class RBS::Parser + class << self + # pkg:gem/rbs#lib/rbs.rb:71 + def _lex(_arg0, _arg1); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_signature(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end + + # pkg:gem/rbs#lib/rbs.rb:71 + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:79 + def buffer(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:132 + def byte_range(char_range, content); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:70 + def lex(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:46 + def magic_comment(buf); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:122 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:127 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:14 + def parse_method_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:20 + def parse_signature(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:8 + def parse_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil), void_allowed: T.unsafe(nil), self_allowed: T.unsafe(nil), classish_allowed: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:41 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/parser_aux.rb:88 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/parser/lex_result.rb:5 +class RBS::Parser::LexResult + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:9 + def initialize(buffer:, value:); end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:7 + def value; end +end + +# pkg:gem/rbs#lib/rbs/parser/token.rb:5 +class RBS::Parser::Token + # pkg:gem/rbs#lib/rbs/parser/token.rb:9 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:18 + def comment?; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:14 + def value; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:58 + def initialize(location, error_message, token_type); end + + # pkg:gem/rbs#lib/rbs/errors.rb:55 + def error_message; end + + # pkg:gem/rbs#lib/rbs/errors.rb:54 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:56 + def token_type; end +end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:4 +module RBS::Prototype; end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:5 +module RBS::Prototype::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:153 + 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 + # + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:177 + def args_from_node(args_node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:65 + def block_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:141 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:145 + def each_node(nodes); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:165 + def keyword_hash?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:10 + def parse_comments(string, include_trailing:); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:181 + def symbol_literal_node?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:192 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:10 + def initialize(node); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:25 + def calculate(node, conditional:); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:8 + def conditional_nodes; end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:17 + def each_conditional_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:45 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:536 + def block_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:516 + def body_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:431 + def const_to_name(node, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:408 + def const_to_name!(node, context: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:747 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:49 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:787 + def find_def_index_by_name(decls, name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:511 + def function_return_type_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:453 + def function_type_from_body(node, def_name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:529 + def if_unless_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:783 + def is_accessibility?(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:442 + def literal_to_symbol(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:550 + def literal_to_type(node); end + + # backward compatible + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:737 + def node_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:694 + def param_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:75 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:739 + def private; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:82 + def process(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:402 + def process_children(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:743 + def public; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:674 + def range_element_type(types); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:757 + def remove_unnecessary_accessibility_methods!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:805 + def sort_members!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:42 + def source_decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:43 + def toplevel_members; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:663 + def types_to_union_type(types); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:8 +class RBS::Prototype::RB::Context < ::Struct + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:25 + def attribute_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:33 + def enter_namespace(namespace); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:15 + def method_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + # @implements Context + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:11 + def initial(namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/rbi.rb:5 +class RBS::Prototype::RBI + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:12 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:545 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:549 + def const_to_name(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:71 + def current_module; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:75 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:27 + def current_namespace; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:8 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:585 + def each_arg(array, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:599 + def each_child(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:93 + def join_comments(nodes, comments); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:10 + def last_sig; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:262 + def method_type(args_node, type_node, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:9 + def modules; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:23 + def nested_name(name); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:607 + def node_to_hash(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:18 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:335 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:87 + def pop_sig; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:537 + def proc_type?(type_node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:98 + def process(node, comments:, outer: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:33 + def push_class(name, super_class, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:52 + def push_module(name, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:79 + def push_sig(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:460 + def type_of(type_node, variables:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:473 + def type_of0(type_node, variables:); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:79 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:662 + def block_from_ast_of(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:109 + def builder; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:117 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:591 + def ensure_outer_module_declarations(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:73 + def env; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:496 + def generate_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:433 + def generate_constants(mod, decls); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:309 + def generate_methods(mod, module_name, members); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:573 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:535 + def generate_module(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:481 + def generate_super_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:74 + def merge; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:248 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:179 + def method_type(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline=(_arg0); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:76 + def owners_included; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:113 + def parse(file); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:72 + def patterns; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:92 + def target?(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:296 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:75 + def todo; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:105 + def todo_object; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:645 + def type_args(type_name); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:653 + def type_params(mod); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:423 + def can_alias?(mod, method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:137 + def each_mixined_module(type_name, mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:146 + def each_mixined_module_one(type_name, mod); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:213 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:229 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:237 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:225 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:214 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:6 +module RBS::Prototype::Runtime::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:19 + def const_name(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:10 + def only_name(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:53 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:6 +module RBS::Prototype::Runtime::Reflection + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:7 + def object_class(value); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:91 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:108 + def add_decl_members(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:165 + def build_overload_for_keyword_arguments; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:151 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:180 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:117 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:104 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:92 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:102 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/rbs#lib/rbs/prototype/runtime.rb:10 +class RBS::Prototype::Runtime::Todo + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:11 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:50 + def skip_constant?(module_name:, name:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:37 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:57 + def mixin_decls(type_name); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:11 + def initialize(target_class); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:35 + def build_s_members; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:448 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:454 + def initialize(type:, defs:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:452 + def defs; end + + # pkg:gem/rbs#lib/rbs/errors.rb:461 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:451 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:110 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:114 + def initialize(ancestors:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:111 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/errors.rb:112 + def location; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:134 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:527 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:533 + def initialize(alias_names:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:530 + def alias_names; end + + # pkg:gem/rbs#lib/rbs/errors.rb:531 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:540 + def name; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:4 +class RBS::Repository + # pkg:gem/rbs#lib/rbs/repository.rb:74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/repository.rb:98 + def add(dir); end + + # pkg:gem/rbs#lib/rbs/repository.rb:71 + def dirs; end + + # pkg:gem/rbs#lib/rbs/repository.rb:72 + def gems; end + + # pkg:gem/rbs#lib/rbs/repository.rb:108 + def lookup(gem, version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:113 + def lookup_path(gem, version); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:83 + def default; end + + # pkg:gem/rbs#lib/rbs/repository.rb:87 + def find_best_version(version, candidates); end + end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/repository.rb:7 +class RBS::Repository::GemRBS + # pkg:gem/rbs#lib/rbs/repository.rb:11 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/repository.rb:64 + def empty?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:59 + def find_best_version(version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:54 + def latest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:22 + def load!; end + + # pkg:gem/rbs#lib/rbs/repository.rb:8 + def name; end + + # pkg:gem/rbs#lib/rbs/repository.rb:49 + def oldest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:9 + def paths; end + + # pkg:gem/rbs#lib/rbs/repository.rb:45 + def version_names; end + + # pkg:gem/rbs#lib/rbs/repository.rb:17 + def versions; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:69 +class RBS::Repository::VersionPath < ::Struct + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def inspect; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def members; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:4 +module RBS::Resolver; end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:5 +class RBS::Resolver::ConstantResolver + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:88 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def builder; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def child_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:112 + def children(module_name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:100 + def constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:178 + def constants_from_ancestors(module_name, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:163 + def constants_from_context(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:201 + def constants_itself(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def context_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:138 + def load_child_constants(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:122 + def load_context_constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:95 + def resolve(name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:108 + def resolve_child(module_name, name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def table; end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:6 +class RBS::Resolver::ConstantResolver::Table + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:10 + def initialize(environment); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:63 + def children(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def children_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:67 + def constant(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:80 + def constant_of_constant(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:71 + def constant_of_module(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:8 + def constants_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def toplevel; end +end + +# pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:5 +class RBS::Resolver::TypeNameResolver + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:10 + def initialize(all_names, aliases); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:82 + def aliased_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:8 + def aliases; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:6 + def all_names; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:7 + def cache; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:76 + def has_type_name?(full_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:121 + def normalize_namespace(type_name, rhs, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:39 + def resolve(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:104 + def resolve_head_namespace(head, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:62 + def resolve_namespace(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:136 + def resolve_namespace0(type_name, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:88 + def resolve_type_name(type_name, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:32 + def try_cache(query); end + + class << self + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:16 + def build(env); end + end +end + +# pkg:gem/rbs#lib/rbs/source.rb:4 +module RBS::Source; end + +# pkg:gem/rbs#lib/rbs/source.rb:5 +class RBS::Source::RBS + # pkg:gem/rbs#lib/rbs/source.rb:8 + def initialize(buffer, directives, decls); end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def directives; end + + # pkg:gem/rbs#lib/rbs/source.rb:25 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:14 + def each_type_name(&block); end +end + +# pkg:gem/rbs#lib/rbs/source.rb:52 +class RBS::Source::Ruby + # pkg:gem/rbs#lib/rbs/source.rb:58 + def initialize(buffer, prism, declarations, diagnostics); end + + # pkg:gem/rbs#lib/rbs/source.rb:53 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:55 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:56 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/source.rb:76 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:65 + def each_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/source.rb:54 + def prism_result; end +end + +# pkg:gem/rbs#lib/rbs/substitution.rb:4 +class RBS::Substitution + # pkg:gem/rbs#lib/rbs/substitution.rb:12 + def initialize; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:66 + def +(other); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:53 + def [](ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:16 + def add(from:, to:); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:37 + def apply(ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:8 + def empty?; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type=(_arg0); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:5 + def mapping; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:55 + def without(*vars); end + + class << self + # pkg:gem/rbs#lib/rbs/substitution.rb:20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/subtractor.rb:4 +class RBS::Subtractor + # pkg:gem/rbs#lib/rbs/subtractor.rb:5 + def initialize(minuend, subtrahend); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # pkg:gem/rbs#lib/rbs/subtractor.rb:180 + def absolute_typename(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:163 + def access_modifier?(decl); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:120 + def cvar_exist?(owner, name); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:129 + def each_member(owner, &block); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:48 + def filter_members(decl, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:151 + def filter_redundant_access_modifiers(decls); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:106 + def ivar_exist?(owner, name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:60 + def member_exist?(owner, member, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:89 + def method_exist?(owner, method_name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:140 + def mixin_exist?(owner, mixin, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:189 + def typename_candidates(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:167 + def update_decl(decl, members:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:367 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:371 + def initialize(name:, entry:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:369 + def entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:368 + def name; end +end + +# pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:4 +class RBS::TypeAliasDependency + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:14 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # pkg:gem/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 + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:12 + def dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:9 + def direct_dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:52 + def direct_dependencies_of(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:4 +class RBS::TypeAliasRegularity + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:16 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:61 + def build_alias_type(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def builder; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:69 + def compatible_args?(args1, args2); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:110 + def each_alias_type(type, &block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:83 + def each_mutual_alias_defs(&block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:79 + def nonregular?(type_name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:22 + def validate; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:39 + def validate_alias_type(alias_type, names, types); end + + class << self + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:120 + def validate(env:); end + end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:5 +class RBS::TypeAliasRegularity::Diagnostic + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:8 + def initialize(type_name:, nonregular_type:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def nonregular_type; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/type_name.rb:4 +class RBS::TypeName + # pkg:gem/rbs#lib/rbs/type_name.rb:9 + def initialize(namespace:, name:); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:79 + def +(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:25 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:55 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:59 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:51 + def alias?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:47 + def class?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:29 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:31 + def hash; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:67 + def interface?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:7 + def kind; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:5 + def namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:63 + def relative!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:75 + def split; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:39 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:43 + def to_namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:35 + def to_s; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:71 + def with_prefix(namespace); end + + class << self + # pkg:gem/rbs#lib/rbs/type_name.rb:90 + def parse(string); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:614 +class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:620 + def initialize(type_param, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:618 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:617 + def type_param; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:626 + def check!(type_params); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:4 +module RBS::Types; end + +# pkg:gem/rbs#lib/rbs/types.rb:410 +class RBS::Types::Alias + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:415 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:411 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:439 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:431 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:425 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:421 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:202 +module RBS::Types::Application + # pkg:gem/rbs#lib/rbs/types.rb:206 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:204 + def args; end + + # pkg:gem/rbs#lib/rbs/types.rb:232 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:210 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:216 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:244 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:240 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:212 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:203 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:224 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:248 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:41 +module RBS::Types::Bases; end + +# pkg:gem/rbs#lib/rbs/types.rb:109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:110 + def initialize(location:, todo: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:117 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/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 + + # pkg:gem/rbs#lib/rbs/types.rb:45 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:49 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:57 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:98 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:94 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:64 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:69 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:102 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:123 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:130 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:125 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:126 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:121 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:124 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:122 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:1348 +class RBS::Types::Block + # pkg:gem/rbs#lib/rbs/types.rb:1354 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1361 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1352 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1386 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1350 + def required; end + + # pkg:gem/rbs#lib/rbs/types.rb:1351 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1376 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1368 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1349 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:366 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:371 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:367 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:397 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:389 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:381 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:377 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:260 +class RBS::Types::ClassSingleton + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:265 + def initialize(name:, location:, args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:271 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:275 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:277 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:261 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:309 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:301 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:281 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:289 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:293 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:23 +module RBS::Types::EmptyEachType + # pkg:gem/rbs#lib/rbs/types.rb:24 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:32 + def map_type(&block); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:915 +class RBS::Types::Function + # pkg:gem/rbs#lib/rbs/types.rb:971 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + + # pkg:gem/rbs#lib/rbs/types.rb:982 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1053 + def amap(array, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1192 + def drop_head; end + + # pkg:gem/rbs#lib/rbs/types.rb:1209 + def drop_tail; end + + # pkg:gem/rbs#lib/rbs/types.rb:1090 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1075 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1163 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:994 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1008 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1234 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1222 + def has_keyword?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1230 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:996 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1061 + def hmapv(hash, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1036 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1069 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:967 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:963 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1173 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:966 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:962 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:968 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:964 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1188 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:969 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1117 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1104 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:965 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1149 + 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 + + # pkg:gem/rbs#lib/rbs/types.rb:1238 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1136 + def with_return_type(type); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1123 + def empty(return_type); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:916 +class RBS::Types::Function::Param + # pkg:gem/rbs#lib/rbs/types.rb:921 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:927 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:931 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:933 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:919 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:937 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:918 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:945 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:949 + def to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:917 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:322 +class RBS::Types::Interface + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:327 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:323 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:353 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:345 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:337 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:333 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:832 +class RBS::Types::Intersection + # pkg:gem/rbs#lib/rbs/types.rb:836 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:841 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:879 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:845 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:851 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:906 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:902 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:847 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:834 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:887 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:895 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:863 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:859 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:870 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:833 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:910 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1530 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # pkg:gem/rbs#lib/rbs/types.rb:1534 + def initialize(literal:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1539 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1543 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1566 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1562 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1545 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1531 + def literal; end + + # pkg:gem/rbs#lib/rbs/types.rb:1532 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1554 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1558 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1570 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1590 + def unescape_string(string, is_double_quote); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1574 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/types.rb:5 +module RBS::Types::NoFreeVariables + # pkg:gem/rbs#lib/rbs/types.rb:6 + def free_variables(set = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:11 +module RBS::Types::NoSubst + # pkg:gem/rbs#lib/rbs/types.rb:12 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:17 +module RBS::Types::NoTypeName + # pkg:gem/rbs#lib/rbs/types.rb:18 + def map_type_name(&_arg0); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:655 +class RBS::Types::Optional + # pkg:gem/rbs#lib/rbs/types.rb:659 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:664 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:702 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:668 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:674 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:732 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:728 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:670 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:657 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:717 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:710 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:682 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:678 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:688 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:656 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:736 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1407 +class RBS::Types::Proc + # pkg:gem/rbs#lib/rbs/types.rb:1413 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1420 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1409 + def block; end + + # pkg:gem/rbs#lib/rbs/types.rb:1474 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1424 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1430 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1513 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1509 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1426 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1411 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1496 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1487 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1410 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1447 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1437 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1458 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1408 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1517 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:537 +class RBS::Types::Record + # pkg:gem/rbs#lib/rbs/types.rb:541 + def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:565 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def all_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:615 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:569 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:575 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:646 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:642 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:571 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:539 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:631 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:624 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def optional_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:590 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:586 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:599 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:650 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1395 +module RBS::Types::SelfTypeBindingHelper + private + + # pkg:gem/rbs#lib/rbs/types.rb:1398 + def self_type_binding_to_s(t); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1398 + def self_type_binding_to_s(t); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:452 +class RBS::Types::Tuple + # pkg:gem/rbs#lib/rbs/types.rb:456 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:461 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:498 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:465 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:471 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:528 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:524 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:467 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:454 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:513 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:506 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:483 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:479 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:490 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:453 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:532 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:741 +class RBS::Types::Union + # pkg:gem/rbs#lib/rbs/types.rb:745 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:750 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:796 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:754 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:760 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:823 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:819 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:756 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:743 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:804 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:812 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:772 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:768 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:779 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:742 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:827 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1251 +class RBS::Types::UntypedFunction + # pkg:gem/rbs#lib/rbs/types.rb:1254 + def initialize(return_type:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1336 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1284 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1276 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1312 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1340 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1258 + def free_variables(acc = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1320 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1316 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1342 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1262 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1270 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1328 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1332 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1252 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1298 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/types.rb:1292 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1308 + def update(return_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1324 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1304 + def with_return_type(ty); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:133 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # pkg:gem/rbs#lib/rbs/types.rb:139 + def initialize(name:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:144 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:148 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:154 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:193 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:189 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:150 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:135 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:134 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:164 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:160 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:183 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:197 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:168 + def build(v); end + + # pkg:gem/rbs#lib/rbs/types.rb:178 + def fresh(v = T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:349 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:357 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:354 + def aliased_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:355 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:353 + def original_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:352 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/version.rb:4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/validator.rb:4 +class RBS::Validator + # pkg:gem/rbs#lib/rbs/validator.rb:9 + def initialize(env:, resolver: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:15 + def absolute_type(type, context:, &block); end + + # pkg:gem/rbs#lib/rbs/validator.rb:7 + def definition_builder; end + + # pkg:gem/rbs#lib/rbs/validator.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/validator.rb:6 + def resolver; end + + # pkg:gem/rbs#lib/rbs/validator.rb:178 + def type_alias_dependency; end + + # pkg:gem/rbs#lib/rbs/validator.rb:182 + def type_alias_regularity; end + + # pkg:gem/rbs#lib/rbs/validator.rb:158 + def validate_class_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:104 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # pkg:gem/rbs#lib/rbs/validator.rb:24 + def validate_type(type, context:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:63 + def validate_type_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:120 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:154 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:325 +class RBS::VariableDuplicationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:332 + def initialize(type_name:, variable_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:330 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:328 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:329 + def variable_name; end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:4 +class RBS::VarianceCalculator + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:78 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:76 + def builder; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:82 + def env; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:169 + def function(type, result:, context:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:98 + def in_inherit(name:, args:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:86 + def in_method_type(method_type:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:110 + def in_type_alias(name:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:176 + def negate(variance); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:121 + def type(type, result:, context:); end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:5 +class RBS::VarianceCalculator::Result + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:8 + def initialize(variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:45 + def compatible?(var, with_annotation:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:24 + def contravariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:15 + def covariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:37 + def each(&block); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:41 + def include?(name); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:60 + def incompatible?(params); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:33 + def invariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:6 + def result; end +end + +# pkg:gem/rbs#lib/rbs/vendorer.rb:4 +class RBS::Vendorer + # pkg:gem/rbs#lib/rbs/vendorer.rb:8 + def initialize(vendor_dir:, loader:); end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:21 + def clean!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:28 + def copy!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:13 + def ensure_dir; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:6 + def loader; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:5 + def vendor_dir; end +end + +# pkg:gem/rbs#lib/rbs/writer.rb:4 +class RBS::Writer + # pkg:gem/rbs#lib/rbs/writer.rb:8 + def initialize(out:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:366 + def attribute(kind, attr); end + + # pkg:gem/rbs#lib/rbs/writer.rb:42 + def format_annotation(annotation); end + + # pkg:gem/rbs#lib/rbs/writer.rb:23 + def indent(size = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:6 + def indentation; end + + # pkg:gem/rbs#lib/rbs/writer.rb:293 + def method_name(name); end + + # pkg:gem/rbs#lib/rbs/writer.rb:219 + def name_and_args(name, args); end + + # pkg:gem/rbs#lib/rbs/writer.rb:207 + def name_and_params(name, params); end + + # pkg:gem/rbs#lib/rbs/writer.rb:5 + def out; end + + # pkg:gem/rbs#lib/rbs/writer.rb:30 + def prefix; end + + # pkg:gem/rbs#lib/rbs/writer.rb:18 + def preserve!(preserve: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:14 + def preserve?; end + + # pkg:gem/rbs#lib/rbs/writer.rb:396 + def preserve_empty_line(prev, decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:229 + def put_lines(lines, leading_spaces:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:34 + def puts(string = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:79 + def write(contents); end + + # pkg:gem/rbs#lib/rbs/writer.rb:60 + def write_annotation(annotations); end + + # pkg:gem/rbs#lib/rbs/writer.rb:66 + def write_comment(comment); end + + # pkg:gem/rbs#lib/rbs/writer.rb:119 + def write_decl(decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:314 + def write_def(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:306 + def write_loc_source(located); end + + # pkg:gem/rbs#lib/rbs/writer.rb:239 + def write_member(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:102 + def write_use_directive(dir); end +end diff --git a/sorbet/rbi/gems/regexp_parser@2.12.0.rbi b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi new file mode 100644 index 00000000..35b19369 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/regexp_parser@2.2.0.rbi b/sorbet/rbi/gems/regexp_parser@2.2.0.rbi deleted file mode 100644 index d66195fa..00000000 --- a/sorbet/rbi/gems/regexp_parser@2.2.0.rbi +++ /dev/null @@ -1,1131 +0,0 @@ -# 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`. - -module Regexp::Expression; end - -class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation - def alternatives; end - def match_length; end -end - -Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative -class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence; end -module Regexp::Expression::Anchor; end -Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine -Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString - -class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base - def match_length; end -end - -class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base; end -Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine -Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString -Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine -class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base; end -class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base; end -module Regexp::Expression::Assertion; end - -class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base - def match_length; end -end - -class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base; end -class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base; end -class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base; end -class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base; end -module Regexp::Expression::Backreference; end - -class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base - def match_length; end - def referenced_expression; end - def referenced_expression=(_arg0); end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base - def initialize(token, options = T.unsafe(nil)); end - - def name; end - def reference; end -end - -class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name; end - -class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name - def initialize(token, options = T.unsafe(nil)); end - - def recursion_level; end -end - -class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base - def initialize(token, options = T.unsafe(nil)); end - - def number; end - def reference; end -end - -class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number; end -class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative; end - -class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::Number - def initialize(token, options = T.unsafe(nil)); end - - def recursion_level; end -end - -class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number - def effective_number; end - def effective_number=(_arg0); end - def reference; end -end - -class Regexp::Expression::Base - include ::RuboCop::Ext::RegexpParser::Expression::Base - - def initialize(token, options = T.unsafe(nil)); end - - def =~(string, offset = T.unsafe(nil)); end - def a?; end - def ascii_classes?; end - def attributes; end - def base_length; end - def case_insensitive?; end - def coded_offset; end - def conditional_level; end - def conditional_level=(_arg0); end - def d?; end - def default_classes?; end - def extended?; end - def free_spacing?; end - def full_length; end - def greedy?; end - def i?; end - def ignore_case?; end - def is?(test_token, test_type = T.unsafe(nil)); end - def lazy?; end - def level; end - def level=(_arg0); end - def m?; end - def match(string, offset = T.unsafe(nil)); end - def match?(string); end - def matches?(string); end - def multiline?; end - def nesting_level; end - def nesting_level=(_arg0); end - def offset; end - def one_of?(scope, top = T.unsafe(nil)); end - def options; end - def options=(_arg0); end - def possessive?; end - def quantified?; end - def quantifier; end - def quantifier=(_arg0); end - def quantifier_affix(expression_format); end - def quantify(token, text, min = T.unsafe(nil), max = T.unsafe(nil), mode = T.unsafe(nil)); end - def quantity; end - def reluctant?; end - def repetitions; end - def set_level; end - def set_level=(_arg0); end - def starts_at; end - def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - def terminal?; end - def text; end - def text=(_arg0); end - def to_h; end - def to_re(format = T.unsafe(nil)); end - def to_s(format = T.unsafe(nil)); end - def token; end - def token=(_arg0); end - def ts; end - def ts=(_arg0); end - def type; end - def type=(_arg0); end - def type?(test_type); end - def u?; end - def unicode_classes?; end - def unquantified_clone; end - def x?; end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression - include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet - - def initialize(token, options = T.unsafe(nil)); end - - def close; end - def closed; end - def closed=(_arg0); end - def closed?; end - def match_length; end - def negate; end - def negated?; end - def negative; end - def negative=(_arg0); end - def negative?; end - def to_s(format = T.unsafe(nil)); end -end - -class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence - def match_length; end -end - -class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation - def match_length; end -end - -Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence - -class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression - def <<(exp); end - def complete?; end - def match_length; end - def starts_at; end - def to_s(_format = T.unsafe(nil)); end - def ts; end -end - -module Regexp::Expression::CharacterType; end -class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base; end - -class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base - def match_length; end -end - -class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end -class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace; end -module Regexp::Expression::Conditional; end -class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence; end - -class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base - def match_length; end - def reference; end - def referenced_expression; end - def referenced_expression=(_arg0); end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression - def <<(exp); end - def add_sequence(active_opts = T.unsafe(nil)); end - def branch(active_opts = T.unsafe(nil)); end - def branches; end - def condition; end - def condition=(exp); end - def match_length; end - def reference; end - def referenced_expression; end - def referenced_expression=(_arg0); end - def to_s(format = T.unsafe(nil)); end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error - def initialize; end -end - -module Regexp::Expression::EscapeSequence; end - -class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base - def char; end - - private - - def control_sequence_to_s(control_sequence); end - def meta_char_to_codepoint(meta_char); end -end - -class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base; end -class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base; end - -class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base - def char; end - def codepoint; end - def match_length; end -end - -class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base; end -class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base; end - -class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base - def char; end - def chars; end - def codepoint; end - def codepoints; end - def match_length; end -end - -class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - def codepoint; end -end - -class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base; end -class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base; end - -class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base - def char; end -end - -class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - def codepoint; end -end - -class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - def codepoint; end -end - -class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base; end - -class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base - def char; end -end - -class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base; end -class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base; end -class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base; end - -class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base - def match_length; end - def quantify(_token, _text, _min = T.unsafe(nil), _max = T.unsafe(nil), _mode = T.unsafe(nil)); end -end - -module Regexp::Expression::Group; end - -class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base - def match_length; end -end - -class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end - -class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression - def capturing?; end - def comment?; end - def to_s(format = T.unsafe(nil)); end -end - -class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base - def capturing?; end - def identifier; end - def number; end - def number=(_arg0); end - def number_at_level; end - def number_at_level=(_arg0); end -end - -class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base - def comment?; end - def to_s(_format = T.unsafe(nil)); end -end - -class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture - def initialize(token, options = T.unsafe(nil)); end - - def identifier; end - def name; end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base - def option_changes; end - def option_changes=(_arg0); end - - private - - def initialize_copy(orig); end -end - -class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base - def initialize(*_arg0); end - - def implicit=(_arg0); end - def implicit?; end - def to_s(format = T.unsafe(nil)); end -end - -module Regexp::Expression::Keep; end - -class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base - def match_length; end -end - -class Regexp::Expression::Literal < ::Regexp::Expression::Base - def match_length; end -end - -Regexp::Expression::MatchLength = Regexp::MatchLength - -class Regexp::Expression::PosixClass < ::Regexp::Expression::Base - def match_length; end - def name; end - def negative?; end -end - -class Regexp::Expression::Quantifier - def initialize(token, text, min, max, mode); end - - def ==(other); end - def eq(other); end - def greedy?; end - def lazy?; end - def max; end - def min; end - def mode; end - def possessive?; end - def reluctant?; end - def text; end - def to_h; end - def to_s; end - def to_str; end - def token; end - - private - - def initialize_copy(orig); end -end - -Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) - -class Regexp::Expression::Root < ::Regexp::Expression::Subexpression - class << self - def build(options = T.unsafe(nil)); end - def build_token; end - end -end - -class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression - def quantify(token, text, min = T.unsafe(nil), max = T.unsafe(nil), mode = T.unsafe(nil)); end - def starts_at; end - def ts; end - - class << self - def add_to(subexpression, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end - def at_levels(level, set_level, conditional_level); end - end -end - -class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression - def <<(exp); end - def add_sequence(active_opts = T.unsafe(nil)); end - def operands; end - def operator; end - def sequences; end - def starts_at; end - def to_s(format = T.unsafe(nil)); end - def ts; end -end - -class Regexp::Expression::Subexpression < ::Regexp::Expression::Base - include ::Enumerable - - def initialize(token, options = T.unsafe(nil)); end - - def <<(exp); end - def [](*args, &block); end - def at(*args, &block); end - def dig(*indices); end - def each(*args, &block); end - def each_expression(include_self = T.unsafe(nil)); end - def empty?(*args, &block); end - def expressions; end - def expressions=(_arg0); end - def fetch(*args, &block); end - def flat_map(include_self = T.unsafe(nil)); end - def index(*args, &block); end - def inner_match_length; end - def join(*args, &block); end - def last(*args, &block); end - def length(*args, &block); end - def match_length; end - def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - def te; end - def to_h; end - def to_s(format = T.unsafe(nil)); end - def traverse(include_self = T.unsafe(nil), &block); end - def values_at(*args, &block); end - def walk(include_self = T.unsafe(nil), &block); end - - private - - def initialize_copy(orig); end -end - -module Regexp::Expression::UnicodeProperty; end -class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end - -class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base - def match_length; end - def name; end - def negative?; end - def shortcut; end -end - -class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Codepoint; end -class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Letter; end -class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Mark; end -class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Number; end -class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end -class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end -class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end -class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end -class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Punctuation; end -class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Separator; end -class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end -module Regexp::Expression::UnicodeProperty::Symbol; end -class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end -class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end - -class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace - def merge(exp); end -end - -class Regexp::Lexer - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - - private - - def ascend(type, token); end - def break_codepoint_list(token); end - def break_literal(token); end - def conditional_nesting; end - def conditional_nesting=(_arg0); end - def descend(type, token); end - def merge_condition(current); end - def nesting; end - def nesting=(_arg0); end - def set_nesting; end - def set_nesting=(_arg0); end - def shift; end - def shift=(_arg0); end - def tokens; end - def tokens=(_arg0); end - - class << self - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - end -end - -Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) -Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) -Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) - -class Regexp::MatchLength - include ::Enumerable - - def initialize(exp, opts = T.unsafe(nil)); end - - def each(opts = T.unsafe(nil)); end - def endless_each; end - def fixed?; end - def include?(length); end - def inspect; end - def max; end - def min; end - def minmax; end - def to_re; end - - private - - def base_max; end - def base_max=(_arg0); end - def base_min; end - def base_min=(_arg0); end - def exp_class; end - def exp_class=(_arg0); end - def max_rep; end - def max_rep=(_arg0); end - def min_rep; end - def min_rep=(_arg0); end - def reify; end - def reify=(_arg0); end - def test_regexp; end - - class << self - def of(obj); end - end -end - -class Regexp::Parser - include ::Regexp::Expression - include ::Regexp::Expression::UnicodeProperty - - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - - private - - def active_opts; end - def anchor(token); end - def assign_effective_number(exp); end - def assign_referenced_expressions; end - def backref(token); end - def captured_group_count_at_level; end - def captured_group_counts; end - def captured_group_counts=(_arg0); end - def close_completed_character_set_range; end - def close_group; end - def close_set; end - def conditional(token); end - def conditional_nesting; end - def conditional_nesting=(_arg0); end - def count_captured_group; end - def decrease_nesting; end - def escape(token); end - def extract_options(input, options); end - def free_space(token); end - def group(token); end - def increase_level(exp); end - def intersection(token); end - def interval(target_node, token); end - def keep(token); end - def literal(token); end - def meta(token); end - def negate_set; end - def nest(exp); end - def nest_conditional(exp); end - def nesting; end - def nesting=(_arg0); end - def node; end - def node=(_arg0); end - def open_group(token); end - def open_set(token); end - def options_group(token); end - def options_stack; end - def options_stack=(_arg0); end - def parse_token(token); end - def posixclass(token); end - def property(token); end - def quantifier(token); end - def range(token); end - def root; end - def root=(_arg0); end - def sequence_operation(klass, token); end - def set(token); end - def switching_options; end - def switching_options=(_arg0); end - def total_captured_group_count; end - def type(token); end - def update_transplanted_subtree(exp, new_parent); end - - class << self - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - end -end - -Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) -class Regexp::Parser::Error < ::StandardError; end -Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) -class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end -Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty - -class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError - def initialize(type, token); end -end - -class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError - def initialize(type, token); end -end - -Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) - -class Regexp::Scanner - def emit(type, token, text); end - def scan(input_object, options: T.unsafe(nil), &block); end - - private - - def append_literal(data, ts, te); end - def block; end - def block=(_arg0); end - def char_pos; end - def char_pos=(_arg0); end - def conditional_stack; end - def conditional_stack=(_arg0); end - def copy(data, ts, te); end - def emit_literal; end - def emit_meta_control_sequence(data, ts, te, token); end - def emit_options(text); end - def free_spacing; end - def free_spacing=(_arg0); end - def free_spacing?(input_object, options); end - def group_depth; end - def group_depth=(_arg0); end - def in_group?; end - def in_set?; end - def literal; end - def literal=(_arg0); end - def set_depth; end - def set_depth=(_arg0); end - def spacing_stack; end - def spacing_stack=(_arg0); end - def tokens; end - def tokens=(_arg0); end - def validation_error(type, what, reason); end - - class << self - def long_prop_map; end - def scan(input_object, options: T.unsafe(nil), &block); end - def short_prop_map; end - end -end - -class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError - def initialize(what, reason); end -end - -class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError - def initialize(what, reason); end -end - -class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError - def initialize(option, text); end -end - -class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError - def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end -end - -class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError - def initialize(where = T.unsafe(nil)); end -end - -class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end - -class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError - def initialize(name); end -end - -class Regexp::Scanner::ValidationError < ::Regexp::Parser::Error - def initialize(reason); end -end - -module Regexp::Syntax - private - - def comparable_version(name); end - def const_missing(const_name); end - def fallback_version_class(version); end - def inherit_from_version(parent_version, new_version); end - def new(name); end - def specified_versions; end - def supported?(name); end - def version_class(version); end - def version_const_name(version_string); end - def warn_if_future_version(const_name); end - - class << self - def comparable_version(name); end - def const_missing(const_name); end - def fallback_version_class(version); end - def inherit_from_version(parent_version, new_version); end - def new(name); end - def specified_versions; end - def supported?(name); end - def version_class(version); end - def version_const_name(version_string); end - def warn_if_future_version(const_name); end - end -end - -class Regexp::Syntax::Any < ::Regexp::Syntax::Base - def initialize; end - - def implements!(_type, _token); end - def implements?(_type, _token); end -end - -class Regexp::Syntax::Base - include ::Regexp::Syntax::Token - - def initialize; end - - def check!(type, token); end - def check?(type, token); end - def excludes(type, tokens); end - def features; end - def implementations(type); end - def implements(type, tokens); end - def implements!(type, token); end - def implements?(type, token); end - def normalize(type, token); end - def normalize_backref(type, token); end - def normalize_group(type, token); end - - class << self - def inspect; end - end -end - -class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError - def initialize(name); end -end - -class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError - def initialize(syntax, type, token); end -end - -class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end -module Regexp::Syntax::Token; end -Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) -module Regexp::Syntax::Token::Anchor; end -Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Assertion; end -Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Backreference; end -Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::CharacterSet; end -Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::CharacterType; end -Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Conditional; end -Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Escape; end -Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) -module Regexp::Syntax::Token::FreeSpace; end -Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Group; end -Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) -module Regexp::Syntax::Token::Keep; end -Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Literal; end -Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) -module Regexp::Syntax::Token::Meta; end -Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::PosixClass; end -Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::Quantifier; end -Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) -module Regexp::Syntax::Token::SubexpressionCall; end -Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) -module Regexp::Syntax::Token::UnicodeProperty; end -Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) -module Regexp::Syntax::Token::UnicodeProperty::Category; end -Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) -Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) - -class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError - def initialize(name); end -end - -class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base - def initialize; end -end - -class Regexp::Syntax::V1_9 < ::Regexp::Syntax::V1_9_3; end - -class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6 - def initialize; end -end - -class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1 - def initialize; end -end - -class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9 - def initialize; end -end - -class Regexp::Syntax::V2_1 < ::Regexp::Syntax::V2_0_0; end -class Regexp::Syntax::V2_2 < ::Regexp::Syntax::V2_2_0; end - -class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_1 - def initialize; end -end - -class Regexp::Syntax::V2_3 < ::Regexp::Syntax::V2_3_0; end - -class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2 - def initialize; end -end - -class Regexp::Syntax::V2_4 < ::Regexp::Syntax::V2_4_1; end - -class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3 - def initialize; end -end - -class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0 - def initialize; end -end - -class Regexp::Syntax::V2_5 < ::Regexp::Syntax::V2_5_0; end - -class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4 - def initialize; end -end - -class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5 - def initialize; end -end - -class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0 - def initialize; end -end - -class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2 - def initialize; end -end - -class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3 - def initialize; end -end - -Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) -Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) -Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) -Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) - -class Regexp::Token < ::Struct - def conditional_level; end - def conditional_level=(_); end - def length; end - def level; end - def level=(_); end - def next; end - def next=(_arg0); end - def offset; end - def previous; end - def previous=(_arg0); end - def set_level; end - def set_level=(_); end - def te; end - def te=(_); end - def text; end - def text=(_); end - def token; end - def token=(_); end - def ts; end - def ts=(_); end - def type; end - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end diff --git a/sorbet/rbi/gems/reline@0.6.3.rbi b/sorbet/rbi/gems/reline@0.6.3.rbi new file mode 100644 index 00000000..59ae9984 --- /dev/null +++ b/sorbet/rbi/gems/reline@0.6.3.rbi @@ -0,0 +1,2446 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + + +# pkg:gem/reline#lib/reline/version.rb:1 +module Reline + extend ::Forwardable + extend ::SingleForwardable + + # pkg:gem/reline#lib/reline.rb:466 + def eof?(*args, **_arg1, &block); end + + private + + # pkg:gem/reline#lib/reline.rb:455 + def readline(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:487 + def readmultiline(*args, **_arg1, &block); end + + class << self + # pkg:gem/reline#lib/reline.rb:483 + def add_dialog_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:480 + def ambiguous_width(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def auto_indent_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def auto_indent_proc=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:485 + def autocompletion(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:485 + def autocompletion=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def basic_quote_characters(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def basic_quote_characters=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def basic_word_break_characters(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def basic_word_break_characters=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completer_quote_characters(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completer_quote_characters=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completer_word_break_characters(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completer_word_break_characters=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completion_append_character(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completion_append_character=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:453 + def completion_case_fold(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:453 + def completion_case_fold=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completion_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def completion_proc=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:454 + def completion_quote_character(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:494 + def core; end + + # pkg:gem/reline#lib/reline.rb:467 + def delete_text(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:484 + def dialog_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def dig_perfect_match_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def dig_perfect_match_proc=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:440 + def emacs_editing_mode(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:479 + def emacs_editing_mode?(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:490 + def encoding_system_needs; end + + # pkg:gem/reline#lib/reline.rb:465 + def eof?(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def filename_quote_characters(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def filename_quote_characters=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:464 + def get_screen_size(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:439 + def input=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:472 + def insert_text(text); end + + # pkg:gem/reline#lib/reline.rb:481 + def last_incremental_search(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:482 + def last_incremental_search=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:468 + def line_buffer(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:514 + def line_editor; end + + # pkg:gem/reline#lib/reline.rb:439 + def output=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def output_modifier_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def output_modifier_proc=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:469 + def point(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:470 + def point=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def pre_input_hook(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def pre_input_hook=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def prompt_proc(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def prompt_proc=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:452 + def readline(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:446 + def readmultiline(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:478 + def redisplay(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def special_prefixes(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:437 + def special_prefixes=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:510 + def ungetc(c); end + + # pkg:gem/reline#lib/reline.rb:440 + def vi_editing_mode(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:479 + def vi_editing_mode?(*args, **_arg1, &block); end + end +end + +# pkg:gem/reline#lib/reline/io/ansi.rb:4 +class Reline::ANSI < ::Reline::IO + # pkg:gem/reline#lib/reline/io/ansi.rb:22 + def initialize; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:211 + def both_tty?; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:223 + def buffered_output; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:271 + def clear_screen; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:206 + def cursor_pos; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:304 + def deprep(otio); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:159 + def empty_buffer?; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:30 + def encoding; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:259 + def erase_after_cursor; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:170 + def get_screen_size; end + + # if the usage expects to wait indefinitely, use Float::INFINITY for timeout_second + # + # pkg:gem/reline#lib/reline/io/ansi.rb:151 + def getc(timeout_second); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:251 + def hide_cursor; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:155 + def in_pasting?; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:116 + def inner_getc(timeout_second); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:20 + def input=(_arg0); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:231 + def move_cursor_column(x); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:243 + def move_cursor_down(x); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:235 + def move_cursor_up(x); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:20 + def output=(_arg0); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:298 + def prep; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:139 + def read_bracketed_paste; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:291 + def read_single_char(timeout_second); end + + # This only works when the cursor is at the bottom of the scroll range + # For more details, see https://github.com/ruby/reline/pull/577#issuecomment-1646679623 + # + # pkg:gem/reline#lib/reline/io/ansi.rb:265 + def scroll_down(x); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:56 + def set_bracketed_paste_key_bindings(config); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:37 + def set_default_key_bindings(config); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:62 + def set_default_key_bindings_ansi_cursor(config); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:87 + def set_default_key_bindings_comprehensive_list(config); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:180 + def set_screen_size(rows, columns); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:276 + def set_winch_handler(&handler); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:255 + def show_cursor; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:166 + def ungetc(c); end + + # pkg:gem/reline#lib/reline/io/ansi.rb:108 + def with_raw_input; end + + # pkg:gem/reline#lib/reline/io/ansi.rb:215 + def write(string); end + + private + + # pkg:gem/reline#lib/reline/io/ansi.rb:187 + def cursor_pos_internal(timeout:); end +end + +# pkg:gem/reline#lib/reline/io/ansi.rb:5 +Reline::ANSI::ANSI_CURSOR_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/reline#lib/reline/io/ansi.rb:138 +Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# pkg:gem/reline#lib/reline/io/ansi.rb:137 +Reline::ANSI::START_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# pkg:gem/reline#lib/reline/config.rb:1 +class Reline::Config + # pkg:gem/reline#lib/reline/config.rb:31 + def initialize; end + + # pkg:gem/reline#lib/reline/config.rb:162 + def add_default_key_binding(keystroke, target); end + + # pkg:gem/reline#lib/reline/config.rb:158 + def add_default_key_binding_by_keymap(keymap, keystroke, target); end + + # pkg:gem/reline#lib/reline/config.rb:147 + def add_oneshot_key_binding(keystroke, target); end + + # pkg:gem/reline#lib/reline/config.rb:29 + def autocompletion; end + + # pkg:gem/reline#lib/reline/config.rb:29 + def autocompletion=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:319 + def bind_key(key, value); end + + # pkg:gem/reline#lib/reline/config.rb:252 + def bind_variable(name, value, raw_value); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def completion_ignore_case; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def completion_ignore_case=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def convert_meta; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def convert_meta=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def disable_completion; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def disable_completion=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:72 + def editing_mode; end + + # pkg:gem/reline#lib/reline/config.rb:76 + def editing_mode=(val); end + + # pkg:gem/reline#lib/reline/config.rb:80 + def editing_mode_is?(*val); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def emacs_mode_string; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def emacs_mode_string=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def enable_bracketed_paste; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def enable_bracketed_paste=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:217 + def handle_directive(directive, file, no, if_stack); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def history_size; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def history_size=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:92 + def inputrc_path; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def isearch_terminators; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def isearch_terminators=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:142 + def key_bindings; end + + # pkg:gem/reline#lib/reline/config.rb:338 + def key_notation_to_code(notation); end + + # pkg:gem/reline#lib/reline/config.rb:84 + def keymap; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def keyseq_timeout; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def keyseq_timeout=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:88 + def loaded?; end + + # pkg:gem/reline#lib/reline/config.rb:324 + def parse_key_binding(key, func_name); end + + # pkg:gem/reline#lib/reline/config.rb:364 + def parse_keyseq(str); end + + # pkg:gem/reline#lib/reline/config.rb:122 + def read(file = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/config.rb:166 + def read_lines(lines, file = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/config.rb:370 + def reload; end + + # pkg:gem/reline#lib/reline/config.rb:35 + def reset; end + + # pkg:gem/reline#lib/reline/config.rb:154 + def reset_oneshot_key_bindings; end + + # pkg:gem/reline#lib/reline/config.rb:42 + def reset_variables; end + + # pkg:gem/reline#lib/reline/config.rb:314 + def retrieve_string(str); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def show_all_if_ambiguous; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def show_all_if_ambiguous=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def show_mode_in_prompt; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def show_mode_in_prompt=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:2 + def test_mode; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def vi_cmd_mode_string; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def vi_cmd_mode_string=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:26 + def vi_ins_mode_string; end + + # pkg:gem/reline#lib/reline/config.rb:26 + def vi_ins_mode_string=(_arg0); end + + private + + # pkg:gem/reline#lib/reline/config.rb:118 + def default_inputrc_path; end + + # pkg:gem/reline#lib/reline/config.rb:375 + def seven_bit_encoding?(encoding); end +end + +# pkg:gem/reline#lib/reline/config.rb:6 +class Reline::Config::InvalidInputrc < ::RuntimeError + # pkg:gem/reline#lib/reline/config.rb:7 + def file; end + + # pkg:gem/reline#lib/reline/config.rb:7 + def file=(_arg0); end + + # pkg:gem/reline#lib/reline/config.rb:7 + def lineno; end + + # pkg:gem/reline#lib/reline/config.rb:7 + def lineno=(_arg0); end +end + +# pkg:gem/reline#lib/reline/config.rb:4 +Reline::Config::KEYSEQ_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/reline#lib/reline/config.rb:10 +Reline::Config::VARIABLE_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/config.rb:24 +Reline::Config::VARIABLE_NAME_SYMBOLS = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline.rb:40 +class Reline::Core + extend ::Forwardable + + # pkg:gem/reline#lib/reline.rb:68 + def initialize; end + + # pkg:gem/reline#lib/reline.rb:162 + def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline.rb:407 + def ambiguous_width; end + + # pkg:gem/reline#lib/reline.rb:55 + def auto_indent_proc; end + + # pkg:gem/reline#lib/reline.rb:147 + def auto_indent_proc=(p); end + + # pkg:gem/reline#lib/reline.rb:64 + def autocompletion(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:64 + def autocompletion=(*args, **_arg1, &block); end + + # pkg:gem/reline#lib/reline.rb:55 + def basic_quote_characters; end + + # pkg:gem/reline#lib/reline.rb:104 + def basic_quote_characters=(v); end + + # pkg:gem/reline#lib/reline.rb:55 + def basic_word_break_characters; end + + # pkg:gem/reline#lib/reline.rb:96 + def basic_word_break_characters=(v); end + + # pkg:gem/reline#lib/reline.rb:55 + def completer_quote_characters; end + + # pkg:gem/reline#lib/reline.rb:108 + def completer_quote_characters=(v); end + + # pkg:gem/reline#lib/reline.rb:55 + def completer_word_break_characters; end + + # pkg:gem/reline#lib/reline.rb:100 + def completer_word_break_characters=(v); end + + # pkg:gem/reline#lib/reline.rb:55 + def completion_append_character; end + + # pkg:gem/reline#lib/reline.rb:84 + def completion_append_character=(val); end + + # pkg:gem/reline#lib/reline.rb:124 + def completion_case_fold; end + + # pkg:gem/reline#lib/reline.rb:120 + def completion_case_fold=(v); end + + # pkg:gem/reline#lib/reline.rb:55 + def completion_proc; end + + # pkg:gem/reline#lib/reline.rb:132 + def completion_proc=(p); end + + # pkg:gem/reline#lib/reline.rb:128 + def completion_quote_character; end + + # pkg:gem/reline#lib/reline.rb:57 + def config; end + + # pkg:gem/reline#lib/reline.rb:57 + def config=(_arg0); end + + # pkg:gem/reline#lib/reline.rb:172 + def dialog_proc(name_sym); end + + # pkg:gem/reline#lib/reline.rb:55 + def dig_perfect_match_proc; end + + # pkg:gem/reline#lib/reline.rb:156 + def dig_perfect_match_proc=(p); end + + # pkg:gem/reline#lib/reline.rb:194 + def emacs_editing_mode; end + + # pkg:gem/reline#lib/reline.rb:203 + def emacs_editing_mode?; end + + # pkg:gem/reline#lib/reline.rb:80 + def encoding; end + + # pkg:gem/reline#lib/reline.rb:55 + def filename_quote_characters; end + + # pkg:gem/reline#lib/reline.rb:112 + def filename_quote_characters=(v); end + + # pkg:gem/reline#lib/reline.rb:207 + def get_screen_size; end + + # pkg:gem/reline#lib/reline.rb:176 + def input=(val); end + + # pkg:gem/reline#lib/reline.rb:76 + def io_gate; end + + # pkg:gem/reline#lib/reline.rb:58 + def key_stroke; end + + # pkg:gem/reline#lib/reline.rb:58 + def key_stroke=(_arg0); end + + # pkg:gem/reline#lib/reline.rb:60 + def last_incremental_search; end + + # pkg:gem/reline#lib/reline.rb:60 + def last_incremental_search=(_arg0); end + + # pkg:gem/reline#lib/reline.rb:59 + def line_editor; end + + # pkg:gem/reline#lib/reline.rb:59 + def line_editor=(_arg0); end + + # pkg:gem/reline#lib/reline.rb:61 + def output; end + + # pkg:gem/reline#lib/reline.rb:183 + def output=(val); end + + # pkg:gem/reline#lib/reline.rb:55 + def output_modifier_proc; end + + # pkg:gem/reline#lib/reline.rb:137 + def output_modifier_proc=(p); end + + # pkg:gem/reline#lib/reline.rb:55 + def pre_input_hook; end + + # pkg:gem/reline#lib/reline.rb:152 + def pre_input_hook=(p); end + + # pkg:gem/reline#lib/reline.rb:55 + def prompt_proc; end + + # pkg:gem/reline#lib/reline.rb:142 + def prompt_proc=(p); end + + # pkg:gem/reline#lib/reline.rb:276 + def readline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline.rb:250 + def readmultiline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil), &confirm_multiline_termination); end + + # pkg:gem/reline#lib/reline.rb:55 + def special_prefixes; end + + # pkg:gem/reline#lib/reline.rb:116 + def special_prefixes=(v); end + + # pkg:gem/reline#lib/reline.rb:189 + def vi_editing_mode; end + + # pkg:gem/reline#lib/reline.rb:199 + def vi_editing_mode?; end + + private + + # pkg:gem/reline#lib/reline.rb:293 + def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end + + # pkg:gem/reline#lib/reline.rb:412 + def may_req_ambiguous_char_width; end + + # GNU Readline watis for "keyseq-timeout" milliseconds when the input is + # ambiguous whether it is matching or matched. + # If the next character does not arrive within the specified timeout, input + # is considered as matched. + # `ESC` is ambiguous because it can be a standalone ESC (matched) or part of + # `ESC char` or part of CSI sequence (matching). + # + # pkg:gem/reline#lib/reline.rb:377 + def read_io(keyseq_timeout, &block); end +end + +# pkg:gem/reline#lib/reline.rb:41 +Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline.rb:161 +class Reline::Core::DialogProc < ::Struct + # pkg:gem/reline#lib/reline.rb:161 + def context; end + + # pkg:gem/reline#lib/reline.rb:161 + def context=(_); end + + # pkg:gem/reline#lib/reline.rb:161 + def dialog_proc; end + + # pkg:gem/reline#lib/reline.rb:161 + def dialog_proc=(_); end + + class << self + # pkg:gem/reline#lib/reline.rb:161 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline.rb:161 + def inspect; end + + # pkg:gem/reline#lib/reline.rb:161 + def keyword_init?; end + + # pkg:gem/reline#lib/reline.rb:161 + def members; end + + # pkg:gem/reline#lib/reline.rb:161 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline.rb:28 +class Reline::CursorPos < ::Struct + # pkg:gem/reline#lib/reline.rb:28 + def x; end + + # pkg:gem/reline#lib/reline.rb:28 + def x=(_); end + + # pkg:gem/reline#lib/reline.rb:28 + def y; end + + # pkg:gem/reline#lib/reline.rb:28 + def y=(_); end + + class << self + # pkg:gem/reline#lib/reline.rb:28 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline.rb:28 + def inspect; end + + # pkg:gem/reline#lib/reline.rb:28 + def keyword_init?; end + + # pkg:gem/reline#lib/reline.rb:28 + def members; end + + # pkg:gem/reline#lib/reline.rb:28 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline.rb:248 +Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline.rb:211 +Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) + +# pkg:gem/reline#lib/reline.rb:29 +class Reline::DialogRenderInfo < ::Struct + # pkg:gem/reline#lib/reline.rb:29 + def bg_color; end + + # pkg:gem/reline#lib/reline.rb:29 + def bg_color=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def contents; end + + # pkg:gem/reline#lib/reline.rb:29 + def contents=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def face; end + + # pkg:gem/reline#lib/reline.rb:29 + def face=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def height; end + + # pkg:gem/reline#lib/reline.rb:29 + def height=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def pos; end + + # pkg:gem/reline#lib/reline.rb:29 + def pos=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def scrollbar; end + + # pkg:gem/reline#lib/reline.rb:29 + def scrollbar=(_); end + + # pkg:gem/reline#lib/reline.rb:29 + def width; end + + # pkg:gem/reline#lib/reline.rb:29 + def width=(_); end + + class << self + # pkg:gem/reline#lib/reline.rb:29 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline.rb:29 + def inspect; end + + # pkg:gem/reline#lib/reline.rb:29 + def keyword_init?; end + + # pkg:gem/reline#lib/reline.rb:29 + def members; end + + # pkg:gem/reline#lib/reline.rb:29 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/io/dumb.rb:3 +class Reline::Dumb < ::Reline::IO + # pkg:gem/reline#lib/reline/io/dumb.rb:8 + def initialize(encoding: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:49 + def buffered_output; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:101 + def clear_screen; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:76 + def cursor_pos; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:118 + def deprep(otio); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:17 + def dumb?; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:21 + def encoding; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:95 + def erase_after_cursor; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:72 + def get_screen_size; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:53 + def getc(_timeout_second); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:80 + def hide_cursor; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:111 + def in_pasting?; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:37 + def input=(val); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:86 + def move_cursor_column(val); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:92 + def move_cursor_down(val); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:89 + def move_cursor_up(val); end + + # Do not send color reset sequence + # + # pkg:gem/reline#lib/reline/io/dumb.rb:6 + def output=(_arg0); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:115 + def prep; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:98 + def scroll_down(val); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:34 + def set_default_key_bindings(_); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:104 + def set_screen_size(rows, columns); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:108 + def set_winch_handler(&handler); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:83 + def show_cursor; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:68 + def ungetc(c); end + + # pkg:gem/reline#lib/reline/io/dumb.rb:41 + def with_raw_input; end + + # pkg:gem/reline#lib/reline/io/dumb.rb:45 + def write(string); end +end + +# pkg:gem/reline#lib/reline/io/dumb.rb:4 +Reline::Dumb::RESET_COLOR = T.let(T.unsafe(nil), String) + +# NOTE: For making compatible with the rb-readline gem +# +# pkg:gem/reline#lib/reline.rb:15 +Reline::FILENAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# pkg:gem/reline#lib/reline/face.rb:3 +class Reline::Face + class << self + # pkg:gem/reline#lib/reline/face.rb:169 + def [](name); end + + # pkg:gem/reline#lib/reline/face.rb:173 + def config(name, &block); end + + # pkg:gem/reline#lib/reline/face.rb:178 + def configs; end + + # pkg:gem/reline#lib/reline/face.rb:164 + def force_truecolor; end + + # pkg:gem/reline#lib/reline/face.rb:182 + def load_initial_configs; end + + # pkg:gem/reline#lib/reline/face.rb:195 + def reset_to_initial_configs; end + + # pkg:gem/reline#lib/reline/face.rb:160 + def truecolor?; end + end +end + +# pkg:gem/reline#lib/reline/face.rb:58 +class Reline::Face::Config + # pkg:gem/reline#lib/reline/face.rb:62 + def initialize(name, &block); end + + # pkg:gem/reline#lib/reline/face.rb:84 + def [](name); end + + # pkg:gem/reline#lib/reline/face.rb:72 + def define(name, **values); end + + # pkg:gem/reline#lib/reline/face.rb:70 + def definition; end + + # pkg:gem/reline#lib/reline/face.rb:77 + def reconfigure; end + + private + + # pkg:gem/reline#lib/reline/face.rb:126 + def format_to_sgr(ordered_values); end + + # pkg:gem/reline#lib/reline/face.rb:153 + def rgb_expression?(color); end + + # pkg:gem/reline#lib/reline/face.rb:90 + def sgr_rgb(key, value); end + + # pkg:gem/reline#lib/reline/face.rb:108 + def sgr_rgb_256color(key, value); end + + # pkg:gem/reline#lib/reline/face.rb:99 + def sgr_rgb_truecolor(key, value); end +end + +# pkg:gem/reline#lib/reline/face.rb:59 +Reline::Face::Config::ESSENTIAL_DEFINE_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/face.rb:60 +Reline::Face::Config::RESET_SGR = T.let(T.unsafe(nil), String) + +# pkg:gem/reline#lib/reline/face.rb:4 +Reline::Face::SGR_PARAMETERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/reline#lib/reline.rb:527 +Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) + +# pkg:gem/reline#lib/reline/history.rb:1 +class Reline::History < ::Array + # pkg:gem/reline#lib/reline/history.rb:2 + def initialize(config); end + + # pkg:gem/reline#lib/reline/history.rb:52 + def <<(val); end + + # pkg:gem/reline#lib/reline/history.rb:15 + def [](index); end + + # pkg:gem/reline#lib/reline/history.rb:20 + def []=(index, val); end + + # pkg:gem/reline#lib/reline/history.rb:25 + def concat(*val); end + + # pkg:gem/reline#lib/reline/history.rb:10 + def delete_at(index); end + + # pkg:gem/reline#lib/reline/history.rb:31 + def push(*val); end + + # pkg:gem/reline#lib/reline/history.rb:6 + def to_s; end + + private + + # pkg:gem/reline#lib/reline/history.rb:62 + def check_index(index); end +end + +# pkg:gem/reline#lib/reline/io.rb:3 +class Reline::IO + # pkg:gem/reline#lib/reline/io.rb:27 + def dumb?; end + + # Read a single encoding valid character from the input. + # + # pkg:gem/reline#lib/reline/io.rb:40 + def read_single_char(timeout_second); end + + # pkg:gem/reline#lib/reline/io.rb:35 + def reset_color_sequence; end + + # pkg:gem/reline#lib/reline/io.rb:31 + def win?; end + + class << self + # pkg:gem/reline#lib/reline/io.rb:6 + def decide_io_gate; end + end +end + +# pkg:gem/reline#lib/reline.rb:520 +Reline::IOGate = T.let(T.unsafe(nil), Reline::ANSI) + +# EOF key: { char: nil, method_symbol: nil } +# Other key: { char: String, method_symbol: Symbol } +# +# pkg:gem/reline#lib/reline.rb:22 +class Reline::Key < ::Struct + # pkg:gem/reline#lib/reline.rb:22 + def char; end + + # pkg:gem/reline#lib/reline.rb:22 + def char=(_); end + + # pkg:gem/reline#lib/reline.rb:24 + def match?(sym); end + + # pkg:gem/reline#lib/reline.rb:22 + def method_symbol; end + + # pkg:gem/reline#lib/reline.rb:22 + def method_symbol=(_); end + + # pkg:gem/reline#lib/reline.rb:22 + def unused_boolean; end + + # pkg:gem/reline#lib/reline.rb:22 + def unused_boolean=(_); end + + class << self + # pkg:gem/reline#lib/reline.rb:22 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline.rb:22 + def inspect; end + + # pkg:gem/reline#lib/reline.rb:22 + def keyword_init?; end + + # pkg:gem/reline#lib/reline.rb:22 + def members; end + + # pkg:gem/reline#lib/reline.rb:22 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/key_actor/base.rb:1 +class Reline::KeyActor::Base + # pkg:gem/reline#lib/reline/key_actor/base.rb:2 + def initialize(mappings = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/key_actor/base.rb:18 + def add(key, func); end + + # pkg:gem/reline#lib/reline/key_actor/base.rb:8 + def add_mappings(mappings); end + + # pkg:gem/reline#lib/reline/key_actor/base.rb:33 + def clear; end + + # pkg:gem/reline#lib/reline/key_actor/base.rb:29 + def get(key); end + + # pkg:gem/reline#lib/reline/key_actor/base.rb:25 + def matching?(key); end +end + +# pkg:gem/reline#lib/reline/key_actor/composite.rb:1 +class Reline::KeyActor::Composite + # pkg:gem/reline#lib/reline/key_actor/composite.rb:2 + def initialize(key_actors); end + + # pkg:gem/reline#lib/reline/key_actor/composite.rb:10 + def get(key); end + + # pkg:gem/reline#lib/reline/key_actor/composite.rb:6 + def matching?(key); end +end + +# pkg:gem/reline#lib/reline/key_actor/emacs.rb:2 +Reline::KeyActor::EMACS_MAPPING = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/key_actor/vi_command.rb:2 +Reline::KeyActor::VI_COMMAND_MAPPING = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/key_actor/vi_insert.rb:2 +Reline::KeyActor::VI_INSERT_MAPPING = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/key_stroke.rb:1 +class Reline::KeyStroke + # pkg:gem/reline#lib/reline/key_stroke.rb:8 + def initialize(config, encoding); end + + # pkg:gem/reline#lib/reline/key_stroke.rb:6 + def encoding; end + + # pkg:gem/reline#lib/reline/key_stroke.rb:6 + def encoding=(_arg0); end + + # pkg:gem/reline#lib/reline/key_stroke.rb:44 + def expand(input); end + + # pkg:gem/reline#lib/reline/key_stroke.rb:22 + def match_status(input); end + + private + + # pkg:gem/reline#lib/reline/key_stroke.rb:116 + def key_mapping; end + + # returns match status of CSI/SS3 sequence and matched length + # + # pkg:gem/reline#lib/reline/key_stroke.rb:80 + def match_unknown_escape_sequence(input, vi_mode: T.unsafe(nil)); end +end + +# pkg:gem/reline#lib/reline/key_stroke.rb:4 +Reline::KeyStroke::CSI_INTERMEDIATE_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# pkg:gem/reline#lib/reline/key_stroke.rb:3 +Reline::KeyStroke::CSI_PARAMETER_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# pkg:gem/reline#lib/reline/key_stroke.rb:2 +Reline::KeyStroke::ESC_BYTE = T.let(T.unsafe(nil), Integer) + +# Input partially matches to a key sequence +# +# pkg:gem/reline#lib/reline/key_stroke.rb:16 +Reline::KeyStroke::MATCHED = T.let(T.unsafe(nil), Symbol) + +# Input exactly matches to a key sequence +# +# pkg:gem/reline#lib/reline/key_stroke.rb:14 +Reline::KeyStroke::MATCHING = T.let(T.unsafe(nil), Symbol) + +# Input matches to a key sequence and the key sequence is a prefix of another key sequence +# +# pkg:gem/reline#lib/reline/key_stroke.rb:18 +Reline::KeyStroke::MATCHING_MATCHED = T.let(T.unsafe(nil), Symbol) + +# Input does not match to any key sequence +# +# pkg:gem/reline#lib/reline/key_stroke.rb:20 +Reline::KeyStroke::UNMATCHED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/kill_ring.rb:1 +class Reline::KillRing + include ::Enumerable + + # pkg:gem/reline#lib/reline/kill_ring.rb:61 + def initialize(max = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:68 + def append(string, before_p = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:116 + def each; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:83 + def process; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:96 + def yank; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:106 + def yank_pop; end +end + +# pkg:gem/reline#lib/reline/kill_ring.rb:21 +class Reline::KillRing::RingBuffer + # pkg:gem/reline#lib/reline/kill_ring.rb:25 + def initialize(max = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:31 + def <<(point); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:56 + def empty?; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:23 + def head; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:22 + def size; end +end + +# pkg:gem/reline#lib/reline/kill_ring.rb:11 +class Reline::KillRing::RingPoint < ::Struct + # pkg:gem/reline#lib/reline/kill_ring.rb:12 + def initialize(str); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:16 + def ==(other); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def backward; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def backward=(_); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def forward; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def forward=(_); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def str; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def str=(_); end + + class << self + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def inspect; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def keyword_init?; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def members; end + + # pkg:gem/reline#lib/reline/kill_ring.rb:11 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/kill_ring.rb:6 +Reline::KillRing::State::CONTINUED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/kill_ring.rb:5 +Reline::KillRing::State::FRESH = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/kill_ring.rb:7 +Reline::KillRing::State::PROCESSED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/kill_ring.rb:8 +Reline::KillRing::State::YANK = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/line_editor.rb:6 +class Reline::LineEditor + # pkg:gem/reline#lib/reline/line_editor.rb:73 + def initialize(config); end + + # pkg:gem/reline#lib/reline/line_editor.rb:685 + def add_dialog_proc(name, p, context = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:14 + def auto_indent_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:14 + def auto_indent_proc=(_arg0); end + + # TODO: Use "private alias_method" idiom after drop Ruby 2.5. + # + # pkg:gem/reline#lib/reline/line_editor.rb:8 + def byte_pointer; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1234 + def byte_pointer=(val); end + + # pkg:gem/reline#lib/reline/line_editor.rb:398 + def calculate_overlay_levels(overlay_levels); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1074 + def call_completion_proc(pre, target, post, quote); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1081 + def call_completion_proc_with_checking_args(pre, target, post); end + + # pkg:gem/reline#lib/reline/line_editor.rb:446 + def clear_dialogs; end + + # pkg:gem/reline#lib/reline/line_editor.rb:11 + def completion_append_character; end + + # pkg:gem/reline#lib/reline/line_editor.rb:11 + def completion_append_character=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:10 + def completion_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:10 + def completion_proc=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1175 + def confirm_multiline_termination; end + + # pkg:gem/reline#lib/reline/line_editor.rb:9 + def confirm_multiline_termination_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:9 + def confirm_multiline_termination_proc=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:304 + def current_byte_pointer_cursor; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1124 + def current_line; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1200 + def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:867 + def dialog_proc_scope_completion_journey_data; end + + # pkg:gem/reline#lib/reline/line_editor.rb:15 + def dig_perfect_match_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:15 + def dig_perfect_match_proc=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:794 + def editing_mode; end + + # pkg:gem/reline#lib/reline/line_editor.rb:84 + def encoding; end + + # pkg:gem/reline#lib/reline/line_editor.rb:220 + def eof?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:216 + def finalize; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1254 + def finish; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1250 + def finished?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:168 + def handle_signal; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1006 + def input_key(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1180 + def insert_multiline_text(text); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1190 + def insert_text(text); end + + # pkg:gem/reline#lib/reline/line_editor.rb:80 + def io_gate; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1120 + def line; end + + # pkg:gem/reline#lib/reline/line_editor.rb:351 + def modified_lines; end + + # pkg:gem/reline#lib/reline/line_editor.rb:273 + def multiline_off; end + + # pkg:gem/reline#lib/reline/line_editor.rb:269 + def multiline_on; end + + # pkg:gem/reline#lib/reline/line_editor.rb:12 + def output_modifier_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:12 + def output_modifier_proc=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:357 + def prompt_list; end + + # pkg:gem/reline#lib/reline/line_editor.rb:13 + def prompt_proc; end + + # pkg:gem/reline#lib/reline/line_editor.rb:13 + def prompt_proc=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1051 + def push_undo_redo(modified); end + + # pkg:gem/reline#lib/reline/line_editor.rb:473 + def render; end + + # pkg:gem/reline#lib/reline/line_editor.rb:461 + def render_finished; end + + # pkg:gem/reline#lib/reline/line_editor.rb:406 + def render_line_differential(old_items, new_items); end + + # pkg:gem/reline#lib/reline/line_editor.rb:557 + def rerender; end + + # pkg:gem/reline#lib/reline/line_editor.rb:141 + def reset(prompt = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:261 + def reset_line; end + + # pkg:gem/reline#lib/reline/line_editor.rb:224 + def reset_variables(prompt = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:553 + def rest_height(wrapped_cursor_y); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1139 + def retrieve_completion_block; end + + # pkg:gem/reline#lib/reline/line_editor.rb:363 + def screen_height; end + + # pkg:gem/reline#lib/reline/line_editor.rb:371 + def screen_scroll_top; end + + # pkg:gem/reline#lib/reline/line_editor.rb:367 + def screen_width; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1064 + def scroll_into_view; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1128 + def set_current_line(line, byte_pointer = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:88 + def set_pasting_state(in_pasting); end + + # pkg:gem/reline#lib/reline/line_editor.rb:207 + def set_signal_handlers; end + + # pkg:gem/reline#lib/reline/line_editor.rb:996 + def update(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:453 + def update_dialogs(key = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:549 + def upper_space_height(wrapped_cursor_y); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1242 + def whole_buffer; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1238 + def whole_lines; end + + # pkg:gem/reline#lib/reline/line_editor.rb:343 + def with_cache(key, *deps); end + + # pkg:gem/reline#lib/reline/line_editor.rb:949 + def wrap_method_call(method_symbol, key, with_operator); end + + # Calculate cursor position in word wrapped content. + # + # pkg:gem/reline#lib/reline/line_editor.rb:437 + def wrapped_cursor_position; end + + # pkg:gem/reline#lib/reline/line_editor.rb:375 + def wrapped_prompt_and_input_lines; end + + private + + # pkg:gem/reline#lib/reline/line_editor.rb:939 + def argumentable?(method_obj); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1413 + def backward_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1700 + def backward_delete_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1838 + def backward_kill_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1818 + def backward_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1652 + def beginning_of_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1422 + def beginning_of_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1246 + def buffer_empty?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1265 + def byteinsert(str, byte_pointer, other); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1259 + def byteslice!(str, byte_pointer, size); end + + # pkg:gem/reline#lib/reline/line_editor.rb:308 + def calculate_nearest_cursor(cursor); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1272 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1878 + def capitalize_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:95 + def check_mode_string; end + + # pkg:gem/reline#lib/reline/line_editor.rb:109 + def check_multiline_prompt(buffer, mode_string); end + + # pkg:gem/reline#lib/reline/line_editor.rb:972 + def cleanup_waiting; end + + # pkg:gem/reline#lib/reline/line_editor.rb:544 + def clear_rendered_screen_cache; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1802 + def clear_screen(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1292 + def complete(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1310 + def completion_journey_move(direction); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1326 + def completion_journey_up(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1916 + def copy_for_vi(text); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1764 + def delete_char(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1778 + def delete_char_or_list(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:696 + def dialog_range(dialog, dialog_y); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1891 + def downcase_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2169 + def ed_argument_digit(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1649 + def ed_beginning_of_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1796 + def ed_clear_screen(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2115 + def ed_delete_next_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2027 + def ed_delete_prev_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1830 + def ed_delete_prev_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1370 + def ed_digit(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1654 + def ed_end_of_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1681 + def ed_force_submit(_key); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1353 + def ed_insert(str); end + + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1707 + def ed_kill_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1419 + def ed_move_to_beg(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1432 + def ed_move_to_end(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1659 + def ed_newline(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1389 + def ed_next_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1632 + def ed_next_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1402 + def ed_prev_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1615 + def ed_prev_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1812 + def ed_prev_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1578 + def ed_search_next_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1563 + def ed_search_prev_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1840 + def ed_transpose_chars(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1857 + def ed_transpose_words(key); end + + # Editline:: +ed-unassigned+ This editor command always results in an error. + # GNU Readline:: There is no corresponding macro. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1332 + def ed_unassigned(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1870 + def em_capitol_case(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1751 + def em_delete(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1820 + def em_delete_next_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1766 + def em_delete_or_list(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1686 + def em_delete_prev_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2310 + def em_exchange_mark(key); end + + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the + # current line, no matter where point is. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1743 + def em_kill_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1906 + def em_kill_region(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1880 + def em_lower_case(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1804 + def em_next_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2305 + def em_set_mark(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1893 + def em_upper_case(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1780 + def em_yank(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1786 + def em_yank_pop(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2318 + def emacs_editing_mode(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1657 + def end_of_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1435 + def end_of_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2316 + def exchange_point_and_mark(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:802 + def filter_normalize_candidates(target, list); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1400 + def forward_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1551 + def forward_search_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1810 + def forward_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1437 + def generate_searcher(direction); end + + # pkg:gem/reline#lib/reline/line_editor.rb:185 + def handle_interrupted; end + + # pkg:gem/reline#lib/reline/line_editor.rb:173 + def handle_resized; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1576 + def history_search_backward(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1591 + def history_search_forward(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:943 + def inclusive?(method_obj); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1514 + def incremental_search_history(direction); end + + # pkg:gem/reline#lib/reline/line_editor.rb:277 + def insert_new_line(cursor_line, next_line); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1378 + def insert_raw_char(str, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1276 + def key_delete(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1284 + def key_newline(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1716 + def kill_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1749 + def kill_whole_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1828 + def kill_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:798 + def menu(list); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1318 + def menu_complete(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1322 + def menu_complete_backward(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:786 + def modify_lines(before, complete); end + + # pkg:gem/reline#lib/reline/line_editor.rb:880 + def move_completed_list(direction); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1593 + def move_history(history_pointer, line:, cursor:); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2326 + def move_undo_redo(direction); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1647 + def next_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:825 + def perform_completion(preposing, target, postposing, quote, list); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2345 + def prev_action_state_value(type); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1630 + def previous_history(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1103 + def process_auto_indent(line_index = T.unsafe(nil), cursor_dependent: T.unsafe(nil), add_newline: T.unsafe(nil)); end + + # do nothing + # + # pkg:gem/reline#lib/reline/line_editor.rb:1334 + def process_insert(force: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:983 + def process_key(key, method_symbol); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2353 + def re_read_init_file(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2341 + def redo(_key); end + + # Reflects lines to be rendered and new cursor position to the screen + # by calculating the difference from the previous render. + # + # pkg:gem/reline#lib/reline/line_editor.rb:507 + def render_differential(new_lines, new_cursor_x, new_cursor_y); end + + # pkg:gem/reline#lib/reline/line_editor.rb:892 + def retrieve_completion_journey_state; end + + # pkg:gem/reline#lib/reline/line_editor.rb:1546 + def reverse_search_history(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:907 + def run_for_operators(key, method_symbol); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1553 + def search_history(prefix, pointer_range); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2216 + def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2263 + def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1368 + def self_insert(str); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2308 + def set_mark(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2349 + def set_next_action_state(type, value); end + + # pkg:gem/reline#lib/reline/line_editor.rb:300 + def split_line_by_width(str, max_width, offset: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1855 + def transpose_chars(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1868 + def transpose_words(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2337 + def undo(_key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1737 + def unix_line_discard(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1914 + def unix_word_rubout(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1904 + def upcase_word(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:702 + def update_each_dialog(dialog, cursor_column, cursor_row, key = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1926 + def vi_add(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2022 + def vi_add_at_eol(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2041 + def vi_change_meta(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2053 + def vi_change_meta_confirm(byte_pointer_diff); end + + # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1719 + def vi_change_to_eol(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1931 + def vi_command_mode(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2059 + def vi_delete_meta(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2070 + def vi_delete_meta_confirm(byte_pointer_diff); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2003 + def vi_delete_prev_char(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2322 + def vi_editing_mode(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1988 + def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2112 + def vi_end_of_transmission(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1955 + def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2113 + def vi_eof_maybe(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1415 + def vi_first_print(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2138 + def vi_histedit(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1922 + def vi_insert(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2017 + def vi_insert_at_bol(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2296 + def vi_join_lines(key, arg: T.unsafe(nil)); end + + # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the + # beginning of the edit buffer to the cursor and save it to the + # cut buffer. + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. + # + # pkg:gem/reline#lib/reline/line_editor.rb:1730 + def vi_kill_line_prev(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2104 + def vi_list_or_eof(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1935 + def vi_movement_mode(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1970 + def vi_next_big_word(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2208 + def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1937 + def vi_next_word(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2159 + def vi_paste_next(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2150 + def vi_paste_prev(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1979 + def vi_prev_big_word(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2255 + def vi_prev_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1946 + def vi_prev_word(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2184 + def vi_replace_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1548 + def vi_search_next(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1543 + def vi_search_prev(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2175 + def vi_to_column(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2131 + def vi_to_history_line(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2212 + def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2259 + def vi_to_prev_char(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2082 + def vi_yank(key, arg: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:2093 + def vi_yank_confirm(byte_pointer_diff); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1424 + def vi_zero(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1784 + def yank(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:1794 + def yank_pop(key); end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:980 +Reline::LineEditor::ARGUMENT_DIGIT_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/line_editor.rb:45 +class Reline::LineEditor::CompletionJourneyState < ::Struct + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def line_index; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def line_index=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def list; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def list=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def pointer; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def pointer=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def post; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def post=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def pre; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def pre=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def target; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def target=(_); end + + class << self + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def inspect; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def keyword_init?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def members; end + + # pkg:gem/reline#lib/reline/line_editor.rb:45 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:38 +Reline::LineEditor::CompletionState::MENU = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/line_editor.rb:39 +Reline::LineEditor::CompletionState::MENU_WITH_PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/line_editor.rb:37 +Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/line_editor.rb:40 +Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/reline#lib/reline/line_editor.rb:694 +Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/reline#lib/reline/line_editor.rb:640 +class Reline::LineEditor::Dialog + # pkg:gem/reline#lib/reline/line_editor.rb:644 + def initialize(name, config, proc_scope); end + + # pkg:gem/reline#lib/reline/line_editor.rb:668 + def call(key); end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def column; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def column=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:641 + def contents; end + + # pkg:gem/reline#lib/reline/line_editor.rb:661 + def contents=(contents); end + + # pkg:gem/reline#lib/reline/line_editor.rb:641 + def name; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def pointer; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def pointer=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def scroll_top; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def scroll_top=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:653 + def set_cursor_pos(col, row); end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def trap_key; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def trap_key=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def vertical_offset; end + + # pkg:gem/reline#lib/reline/line_editor.rb:642 + def vertical_offset=(_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:641 + def width; end + + # pkg:gem/reline#lib/reline/line_editor.rb:657 + def width=(v); end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:561 +class Reline::LineEditor::DialogProcScope + # pkg:gem/reline#lib/reline/line_editor.rb:564 + def initialize(line_editor, config, proc_to_exec, context); end + + # pkg:gem/reline#lib/reline/line_editor.rb:635 + def call; end + + # pkg:gem/reline#lib/reline/line_editor.rb:581 + def call_completion_proc_with_checking_args(pre, target, post); end + + # pkg:gem/reline#lib/reline/line_editor.rb:627 + def completion_journey_data; end + + # pkg:gem/reline#lib/reline/line_editor.rb:631 + def config; end + + # pkg:gem/reline#lib/reline/line_editor.rb:572 + def context; end + + # pkg:gem/reline#lib/reline/line_editor.rb:606 + def cursor_pos; end + + # pkg:gem/reline#lib/reline/line_editor.rb:589 + def dialog; end + + # pkg:gem/reline#lib/reline/line_editor.rb:610 + def just_cursor_moving; end + + # pkg:gem/reline#lib/reline/line_editor.rb:602 + def key; end + + # pkg:gem/reline#lib/reline/line_editor.rb:622 + def preferred_dialog_height; end + + # pkg:gem/reline#lib/reline/line_editor.rb:576 + def retrieve_completion_block(_unused = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/line_editor.rb:618 + def screen_height; end + + # pkg:gem/reline#lib/reline/line_editor.rb:614 + def screen_width; end + + # pkg:gem/reline#lib/reline/line_editor.rb:593 + def set_cursor_pos(col, row); end + + # pkg:gem/reline#lib/reline/line_editor.rb:585 + def set_dialog(dialog); end + + # pkg:gem/reline#lib/reline/line_editor.rb:598 + def set_key(key); end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:562 +class Reline::LineEditor::DialogProcScope::CompletionJourneyData < ::Struct + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def list; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def list=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def pointer; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def pointer=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def postposing; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def postposing=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def preposing; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def preposing=(_); end + + class << self + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def inspect; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def keyword_init?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def members; end + + # pkg:gem/reline#lib/reline/line_editor.rb:562 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:1050 +Reline::LineEditor::MAX_UNDO_REDO_HISTORY_SIZE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/reline#lib/reline/line_editor.rb:71 +Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/reline#lib/reline/line_editor.rb:48 +class Reline::LineEditor::MenuInfo + # pkg:gem/reline#lib/reline/line_editor.rb:51 + def initialize(list); end + + # pkg:gem/reline#lib/reline/line_editor.rb:55 + def lines(screen_width); end + + # pkg:gem/reline#lib/reline/line_editor.rb:49 + def list; end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:46 +Reline::LineEditor::NullActionState = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/line_editor.rb:43 +class Reline::LineEditor::RenderedScreen < ::Struct + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def base_y; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def base_y=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def cursor_y; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def cursor_y=(_); end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def lines; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def lines=(_); end + + class << self + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def [](*_arg0); end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def inspect; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def keyword_init?; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def members; end + + # pkg:gem/reline#lib/reline/line_editor.rb:43 + def new(*_arg0); end + end +end + +# pkg:gem/reline#lib/reline/line_editor.rb:17 +Reline::LineEditor::VI_MOTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/line_editor.rb:981 +Reline::LineEditor::VI_WAITING_ACCEPT_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline.rb:16 +Reline::USERNAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# pkg:gem/reline#lib/reline/unicode.rb:1 +class Reline::Unicode + class << self + # pkg:gem/reline#lib/reline/unicode.rb:104 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/unicode.rb:393 + def common_prefix(list, ignore_case: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/unicode.rb:75 + def east_asian_width(ord); end + + # pkg:gem/reline#lib/reline/unicode.rb:298 + def ed_transpose_words(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:284 + def em_backward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:291 + def em_big_backward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:270 + def em_forward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:277 + def em_forward_word_with_capitalization(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:44 + def escape_for_print(str); end + + # pkg:gem/reline#lib/reline/unicode.rb:81 + def get_mbchar_width(mbchar); end + + # pkg:gem/reline#lib/reline/unicode.rb:256 + def get_next_mbchar_size(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:261 + def get_prev_mbchar_size(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:57 + def safe_encode(str, encoding); end + + # pkg:gem/reline#lib/reline/unicode.rb:418 + def space_character?(s); end + + # This method is used by IRB + # + # pkg:gem/reline#lib/reline/unicode.rb:131 + def split_by_width(str, max_width); end + + # pkg:gem/reline#lib/reline/unicode.rb:136 + def split_line_by_width(str, max_width, encoding = T.unsafe(nil), offset: T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/unicode.rb:178 + def strip_non_printing_start_end(prompt); end + + # pkg:gem/reline#lib/reline/unicode.rb:187 + def take_mbchar_range(str, start_col, width, cover_begin: T.unsafe(nil), cover_end: T.unsafe(nil), padding: T.unsafe(nil)); end + + # Take a chunk of a String cut by width with escape sequences. + # + # pkg:gem/reline#lib/reline/unicode.rb:183 + def take_range(str, start_col, max_width); end + + # pkg:gem/reline#lib/reline/unicode.rb:384 + def vi_backward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:339 + def vi_big_backward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:329 + def vi_big_forward_end_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:322 + def vi_big_forward_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:406 + def vi_first_print(line); end + + # pkg:gem/reline#lib/reline/unicode.rb:366 + def vi_forward_end_word(line, byte_pointer); end + + # pkg:gem/reline#lib/reline/unicode.rb:346 + def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end + + # pkg:gem/reline#lib/reline/unicode.rb:412 + def word_character?(s); end + end +end + +# pkg:gem/reline#lib/reline/unicode.rb:40 +Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) + +# This is based on EastAsianWidth.txt +# UNICODE_VERSION = '16.0.0' +# +# pkg:gem/reline#lib/reline/unicode/east_asian_width.rb:5 +Reline::Unicode::EastAsianWidth::CHUNK_LAST = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/unicode/east_asian_width.rb:5 +Reline::Unicode::EastAsianWidth::CHUNK_WIDTH = T.let(T.unsafe(nil), Array) + +# pkg:gem/reline#lib/reline/unicode.rb:2 +Reline::Unicode::EscapedPairs = T.let(T.unsafe(nil), Hash) + +# pkg:gem/reline#lib/reline/unicode.rb:39 +Reline::Unicode::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# pkg:gem/reline#lib/reline/unicode.rb:38 +Reline::Unicode::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# pkg:gem/reline#lib/reline/unicode.rb:41 +Reline::Unicode::OSC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/reline#lib/reline/unicode.rb:42 +Reline::Unicode::WIDTH_SCANNER = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/reline#lib/reline/version.rb:2 +Reline::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/require-hooks@0.4.0.rbi b/sorbet/rbi/gems/require-hooks@0.4.0.rbi new file mode 100644 index 00000000..1e536b20 --- /dev/null +++ b/sorbet/rbi/gems/require-hooks@0.4.0.rbi @@ -0,0 +1,152 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `require-hooks` gem. +# Please instead update this file by running `bin/tapioca gem require-hooks`. + + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:3 +module RequireHooks + class << self + # Define a block to wrap the code loading. + # The return value MUST be a result of calling the passed block. + # For example, you can use such hooks for instrumentation, debugging purposes. + # + # RequireHooks.around_load do |path, &block| + # puts "Loading #{path}" + # block.call.tap { puts "Loaded #{path}" } + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:103 + def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:139 + def context_for(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:168 + def contexts; end + + # This hook should be used to manually compile byte code to be loaded by the VM. + # The arguments are (path, source = nil), where source is only defined if transformations took place. + # Otherwise, you MUST read the source code from the file yourself. + # + # The return value MUST be either nil (continue to the next hook or default behavior) or a platform-specific bytecode object (e.g., RubyVM::InstructionSequence). + # + # RequireHooks.hijack_load do |path, source| + # source ||= File.read(path) + # if defined?(RubyVM::InstructionSequence) + # RubyVM::InstructionSequence.compile(source) + # elsif defined?(JRUBY_VERSION) + # JRuby.compile(source) + # end + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:135 + def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings=(_arg0); end + + # Hack to enable coverage for hooked files. + # Requires eval coverage to be on. + # See https://bugs.ruby-lang.org/issues/22018 (https://github.com/ruby/ruby/pull/16805) + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:160 + def setup_path_coverage(path, contents = T.unsafe(nil)); end + + # Define hooks to perform source-to-source transformations. + # The return value MUST be either String (new source code) or nil (indicating that no transformations were performed). + # + # NOTE: The second argument (`source`) MAY be nil, indicating that no transformer tried to transform the source code. + # + # + # RequireHooks.source_transform do |path, source| + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:117 + def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + private + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:184 + def eval_coverage_enabled?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:174 + def register_hook(type, block, patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:4 +class RequireHooks::Context + # pkg:gem/require-hooks#lib/require-hooks/api.rb:8 + def initialize(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def around_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:30 + def empty?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def exclude_patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:45 + def hijack?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def hijack_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:24 + def match?(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:81 + def merge!(another_ctx); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:59 + def perform_source_transform(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:35 + def readonly?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:49 + def run_around_load_callbacks(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def source_transform; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:41 + def source_transform?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:20 + def to_key; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:71 + def try_hijack_load(path, source); end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:6 +RequireHooks::EMPTY_ISEQ = T.let(T.unsafe(nil), RubyVM::InstructionSequence) + +# pkg:gem/require-hooks#lib/require-hooks/iseq.rb:4 +module RequireHooks::Iseq + class << self + # pkg:gem/require-hooks#lib/require-hooks/iseq.rb:6 + def compile_with_coverage(ctx, path); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:8 +module RequireHooks::LoadIseq + # pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:9 + def load_iseq(path); end +end + +class RubyVM::InstructionSequence + extend ::RequireHooks::LoadIseq +end diff --git a/sorbet/rbi/gems/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.5.rbi deleted file mode 100644 index 493c0fc3..00000000 --- a/sorbet/rbi/gems/rexml@3.2.5.rbi +++ /dev/null @@ -1,672 +0,0 @@ -# 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`. - -class REXML::AttlistDecl < ::REXML::Child - include ::Enumerable - - def initialize(source); end - - def [](key); end - def each(&block); end - def element_name; end - def include?(key); end - def node_type; end - def write(out, indent = T.unsafe(nil)); end -end - -class REXML::Attribute - include ::REXML::Node - include ::REXML::XMLTokens - include ::REXML::Namespace - - def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end - - def ==(other); end - def clone; end - def doctype; end - def element; end - def element=(element); end - def hash; end - def inspect; end - def namespace(arg = T.unsafe(nil)); end - def node_type; end - def normalized=(_arg0); end - def prefix; end - def remove; end - def to_s; end - def to_string; end - def value; end - def write(output, indent = T.unsafe(nil)); end - def xpath; end -end - -class REXML::Attributes < ::Hash - def initialize(element); end - - def <<(attribute); end - def [](name); end - def []=(name, value); end - def add(attribute); end - def delete(attribute); end - def delete_all(name); end - def each; end - def each_attribute; end - def get_attribute(name); end - def get_attribute_ns(namespace, name); end - def length; end - def namespaces; end - def prefixes; end - def size; end - def to_a; end -end - -class REXML::CData < ::REXML::Text - def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end - - def clone; end - def to_s; end - def value; end - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -class REXML::Child - include ::REXML::Node - - def initialize(parent = T.unsafe(nil)); end - - def bytes; end - def document; end - def next_sibling; end - def next_sibling=(other); end - def parent; end - def parent=(other); end - def previous_sibling; end - def previous_sibling=(other); end - def remove; end - def replace_with(child); end -end - -class REXML::Comment < ::REXML::Child - include ::Comparable - - def initialize(first, second = T.unsafe(nil)); end - - def <=>(other); end - def ==(other); end - def clone; end - def node_type; end - def string; end - def string=(_arg0); end - def to_s; end - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -module REXML::DClonable; end - -class REXML::Declaration < ::REXML::Child - def initialize(src); end - - def to_s; end - def write(output, indent); end -end - -class REXML::DocType < ::REXML::Parent - include ::REXML::XMLTokens - - def initialize(first, parent = T.unsafe(nil)); end - - def add(child); end - def attribute_of(element, attribute); end - def attributes_of(element); end - def clone; end - def context; end - def entities; end - def entity(name); end - def external_id; end - def name; end - def namespaces; end - def node_type; end - def notation(name); end - def notations; end - def public; end - def system; end - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -class REXML::Document < ::REXML::Element - def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end - - def <<(child); end - def add(child); end - def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end - def clone; end - def doctype; end - def document; end - def encoding; end - def entity_expansion_count; end - def expanded_name; end - def name; end - def node_type; end - def record_entity_expansion; end - def root; end - def stand_alone?; end - def version; end - def write(*arguments); end - def xml_decl; end - - private - - def build(source); end - - class << self - def entity_expansion_limit; end - def entity_expansion_limit=(val); end - def entity_expansion_text_limit; end - def entity_expansion_text_limit=(val); end - def parse_stream(source, listener); end - end -end - -class REXML::Element < ::REXML::Parent - include ::REXML::XMLTokens - include ::REXML::Namespace - - def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end - - def [](name_or_index); end - def add_attribute(key, value = T.unsafe(nil)); end - def add_attributes(hash); end - def add_element(element, attrs = T.unsafe(nil)); end - def add_namespace(prefix, uri = T.unsafe(nil)); end - def add_text(text); end - def attribute(name, namespace = T.unsafe(nil)); end - def attributes; end - def cdatas; end - def clone; end - def comments; end - def context; end - def context=(_arg0); end - def delete_attribute(key); end - def delete_element(element); end - def delete_namespace(namespace = T.unsafe(nil)); end - def document; end - def each_element(xpath = T.unsafe(nil), &block); end - def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - def elements; end - def get_elements(xpath); end - def get_text(path = T.unsafe(nil)); end - def has_attributes?; end - def has_elements?; end - def has_text?; end - def ignore_whitespace_nodes; end - def inspect; end - def instructions; end - def namespace(prefix = T.unsafe(nil)); end - def namespaces; end - def next_element; end - def node_type; end - def prefixes; end - def previous_element; end - def raw; end - def root; end - def root_node; end - def text(path = T.unsafe(nil)); end - def text=(text); end - def texts; end - def whitespace; end - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - def xpath; end - - private - - def __to_xpath_helper(node); end - def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end -end - -class REXML::ElementDecl < ::REXML::Declaration - def initialize(src); end -end - -class REXML::Elements - include ::Enumerable - - def initialize(parent); end - - def <<(element = T.unsafe(nil)); end - def [](index, name = T.unsafe(nil)); end - def []=(index, element); end - def add(element = T.unsafe(nil)); end - def collect(xpath = T.unsafe(nil)); end - def delete(element); end - def delete_all(xpath); end - def each(xpath = T.unsafe(nil)); end - def empty?; end - def index(element); end - def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end - def parent; end - def size; end - def to_a(xpath = T.unsafe(nil)); end - - private - - def literalize(name); end -end - -module REXML::Encoding - def decode(string); end - def encode(string); end - def encoding; end - def encoding=(encoding); end - - private - - def find_encoding(name); end -end - -class REXML::Entity < ::REXML::Child - include ::REXML::XMLTokens - - def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end - - def external; end - def name; end - def ndata; end - def normalized; end - def pubid; end - def ref; end - def to_s; end - def unnormalized; end - def value; end - def write(out, indent = T.unsafe(nil)); end - - class << self - def matches?(string); end - end -end - -class REXML::ExternalEntity < ::REXML::Child - def initialize(src); end - - def to_s; end - def write(output, indent); end -end - -class REXML::Formatters::Default - def initialize(ie_hack = T.unsafe(nil)); end - - def write(node, output); end - - protected - - def write_cdata(node, output); end - def write_comment(node, output); end - def write_document(node, output); end - def write_element(node, output); end - def write_instruction(node, output); end - def write_text(node, output); end -end - -class REXML::Formatters::Pretty < ::REXML::Formatters::Default - def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - def compact; end - def compact=(_arg0); end - def width; end - def width=(_arg0); end - - protected - - def write_cdata(node, output); end - def write_comment(node, output); end - def write_document(node, output); end - def write_element(node, output); end - def write_text(node, output); end - - private - - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - def wrap(string, width); end -end - -class REXML::IOSource < ::REXML::Source - def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - - def consume(pattern); end - def current_line; end - def empty?; end - def match(pattern, cons = T.unsafe(nil)); end - def position; end - def read; end - def scan(pattern, cons = T.unsafe(nil)); end - - private - - def encoding_updated; end - def readline; end -end - -class REXML::Instruction < ::REXML::Child - def initialize(target, content = T.unsafe(nil)); end - - def ==(other); end - def clone; end - def content; end - def content=(_arg0); end - def inspect; end - def node_type; end - def target; end - def target=(_arg0); end - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -class REXML::NotationDecl < ::REXML::Child - def initialize(name, middle, pub, sys); end - - def name; end - def public; end - def public=(_arg0); end - def system; end - def system=(_arg0); end - def to_s; end - def write(output, indent = T.unsafe(nil)); end -end - -class REXML::Output - include ::REXML::Encoding - - def initialize(real_IO, encd = T.unsafe(nil)); end - - def <<(content); end - def encoding; end - def to_s; end -end - -class REXML::Parent < ::REXML::Child - include ::Enumerable - - def initialize(parent = T.unsafe(nil)); end - - def <<(object); end - def [](index); end - def []=(*args); end - def add(object); end - def children; end - def deep_clone; end - def delete(object); end - def delete_at(index); end - def delete_if(&block); end - def each(&block); end - def each_child(&block); end - def each_index(&block); end - def index(child); end - def insert_after(child1, child2); end - def insert_before(child1, child2); end - def length; end - def parent?; end - def push(object); end - def replace_child(to_replace, replacement); end - def size; end - def to_a; end - def unshift(object); end -end - -class REXML::ParseException < ::RuntimeError - def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - - def context; end - def continued_exception; end - def continued_exception=(_arg0); end - def line; end - def parser; end - def parser=(_arg0); end - def position; end - def source; end - def source=(_arg0); end - def to_s; end -end - -class REXML::Parsers::BaseParser - def initialize(source); end - - def add_listener(listener); end - def empty?; end - def entity(reference, entities); end - def has_next?; end - def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - def peek(depth = T.unsafe(nil)); end - def position; end - def pull; end - def source; end - def stream=(source); end - def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end - def unshift(token); end - - private - - def need_source_encoding_update?(xml_declaration_encoding); end - def parse_attributes(prefixes, curr_ns); end - def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - def parse_name(base_error_message); end - def process_instruction; end - def pull_event; end -end - -REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) -REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) -REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) -REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) -REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) - -class REXML::Parsers::StreamParser - def initialize(source, listener); end - - def add_listener(listener); end - def parse; end -end - -class REXML::Parsers::TreeParser - def initialize(source, build_context = T.unsafe(nil)); end - - def add_listener(listener); end - def parse; end -end - -class REXML::Parsers::XPathParser - include ::REXML::XMLTokens - - def abbreviate(path); end - def expand(path); end - def namespaces=(namespaces); end - def parse(path); end - def predicate(path); end - def predicate_to_string(path, &block); end - - private - - def AdditiveExpr(path, parsed); end - def AndExpr(path, parsed); end - def EqualityExpr(path, parsed); end - def FilterExpr(path, parsed); end - def FunctionCall(rest, parsed); end - def LocationPath(path, parsed); end - def MultiplicativeExpr(path, parsed); end - def NodeTest(path, parsed); end - def OrExpr(path, parsed); end - def PathExpr(path, parsed); end - def Predicate(path, parsed); end - def PrimaryExpr(path, parsed); end - def RelationalExpr(path, parsed); end - def RelativeLocationPath(path, parsed); end - def UnaryExpr(path, parsed); end - def UnionExpr(path, parsed); end - def get_group(string); end - def parse_args(string); end -end - -REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) -REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) - -class REXML::ReferenceWriter - def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end - - def write(output); end -end - -class REXML::Source - include ::REXML::Encoding - - def initialize(arg, encoding = T.unsafe(nil)); end - - def buffer; end - def consume(pattern); end - def current_line; end - def empty?; end - def encoding; end - def encoding=(enc); end - def line; end - def match(pattern, cons = T.unsafe(nil)); end - def match_to(char, pattern); end - def match_to_consume(char, pattern); end - def position; end - def read; end - def scan(pattern, cons = T.unsafe(nil)); end - - private - - def detect_encoding; end - def encoding_updated; end -end - -class REXML::Text < ::REXML::Child - include ::Comparable - - 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 - - def <<(to_append); end - def <=>(other); end - def clone; end - def doctype; end - def empty?; end - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - def inspect; end - def node_type; end - def parent=(parent); end - def raw; end - def raw=(_arg0); end - def to_s; end - def value; end - def value=(val); end - def wrap(string, width, addnewline = T.unsafe(nil)); end - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - def write_with_substitution(out, input); end - def xpath; end - - private - - def clear_cache; end - - class << self - def check(string, pattern, doctype); end - def expand(ref, doctype, filter); end - def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - def read_with_substitution(input, illegal = T.unsafe(nil)); end - def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - end -end - -class REXML::UndefinedNamespaceException < ::REXML::ParseException - def initialize(prefix, source, parser); end -end - -class REXML::Validation::ValidationException < ::RuntimeError - def initialize(msg); end -end - -class REXML::XMLDecl < ::REXML::Child - include ::REXML::Encoding - - def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end - - def ==(other); end - def clone; end - def dowrite; end - def encoding=(enc); end - def inspect; end - def node_type; end - def nowrite; end - def old_enc=(encoding); end - def stand_alone?; end - def standalone; end - def standalone=(_arg0); end - def version; end - def version=(_arg0); end - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - def writeencoding; end - def writethis; end - def xmldecl(version, encoding, standalone); end - - private - - def content(enc); end - - class << self - def default; end - end -end - -class REXML::XPathNode - def initialize(node, context = T.unsafe(nil)); end - - def context; end - def position; end - def raw_node; end -end - -class REXML::XPathParser - include ::REXML::XMLTokens - - def initialize(strict: T.unsafe(nil)); end - - def []=(variable_name, value); end - def first(path_stack, node); end - def get_first(path, nodeset); end - def match(path_stack, nodeset); end - def namespaces=(namespaces = T.unsafe(nil)); end - def parse(path, nodeset); end - def predicate(path, nodeset); end - def variables=(vars = T.unsafe(nil)); end - - private - - def child(nodeset); end - def compare(a, operator, b); end - def descendant(nodeset, include_self); end - def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - def each_unnode(nodeset); end - def enter(tag, *args); end - def equality_relational_compare(set1, op, set2); end - def evaluate_predicate(expression, nodesets); end - def expr(path_stack, nodeset, context = T.unsafe(nil)); end - def filter_nodeset(nodeset); end - def following(node); end - def following_node_of(node); end - def get_namespace(node, prefix); end - def leave(tag, *args); end - def next_sibling_node(node); end - def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - def norm(b); end - def normalize_compare_values(a, operator, b); end - def preceding(node); end - def preceding_node_of(node); end - def sort(array_of_nodes, order); end - def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end - def strict?; end - def trace(*args); end - def unnode(nodeset); end - def value_type(value); end -end diff --git a/sorbet/rbi/gems/rexml@3.4.4.rbi b/sorbet/rbi/gems/rexml@3.4.4.rbi new file mode 100644 index 00000000..0a38bc4c --- /dev/null +++ b/sorbet/rbi/gems/rexml@3.4.4.rbi @@ -0,0 +1,4905 @@ +# typed: false + +# 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. +# +# pkg:gem/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? + # + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:29 + def initialize(source); end + + # Access the attlist attribute/value pairs. + # value = attlist_decl[ attribute_name ] + # + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:38 + def [](key); end + + # Iterate over the key/value pairs: + # attlist_decl.each { |attribute_name, attribute_value| ... } + # + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:50 + def each(&block); end + + # What is this? Got me. + # + # pkg:gem/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" + # + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:44 + def include?(key); end + + # pkg:gem/rexml#lib/rexml/attlistdecl.rb:59 + def node_type; end + + # Write out exactly what we got in. + # + # pkg:gem/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. +# +# pkg:gem/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 ) + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/attribute.rb:106 + def ==(other); end + + # Returns a copy of this attribute + # + # pkg:gem/rexml#lib/rexml/attribute.rb:161 + def clone; end + + # pkg:gem/rexml#lib/rexml/attribute.rb:132 + def doctype; end + + # pkg:gem/rexml#lib/rexml/attribute.rb:205 + def document; end + + # The element to which this attribute belongs + # + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/attribute.rb:169 + def element=(element); end + + # Creates (and returns) a hash from both the name and value + # + # pkg:gem/rexml#lib/rexml/attribute.rb:111 + def hash; end + + # pkg:gem/rexml#lib/rexml/attribute.rb:195 + 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 # => "" + # + # pkg:gem/rexml#lib/rexml/attribute.rb:95 + def namespace(arg = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/attribute.rb:191 + def node_type; end + + # The normalized value of this attribute. That is, the attribute with + # entities intact. + # + # pkg:gem/rexml#lib/rexml/attribute.rb:155 + 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 # -> "" + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/attribute.rb:182 + def remove; end + + # Returns the attribute value, with entities replaced + # + # pkg:gem/rexml#lib/rexml/attribute.rb:137 + 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'" + # + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/attribute.rb:146 + def value; end + + # Writes this attribute (EG, puts 'key="value"' to the output) + # + # pkg:gem/rexml#lib/rexml/attribute.rb:187 + def write(output, indent = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/attribute.rb:201 + def xpath; end +end + +# A class that defines the set of Attributes of an Element and provides +# operations for accessing elements in that set. +# +# pkg:gem/rexml#lib/rexml/element.rb:2131 +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+. + # + # pkg:gem/rexml#lib/rexml/element.rb:2150 + def initialize(element); end + + # pkg:gem/rexml#lib/rexml/element.rb:2520 + 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). + # + # pkg:gem/rexml#lib/rexml/element.rb:2175 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2358 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2516 + 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) # => # => + # + # pkg:gem/rexml#lib/rexml/element.rb:2471 + 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='<'] + # + # pkg:gem/rexml#lib/rexml/element.rb:2538 + 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", "<"] + # + # pkg:gem/rexml#lib/rexml/element.rb:2276 + 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='<'] + # + # pkg:gem/rexml#lib/rexml/element.rb:2243 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2302 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2564 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2214 + 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"} + # + # pkg:gem/rexml#lib/rexml/element.rb:2426 + 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"] + # + # pkg:gem/rexml#lib/rexml/element.rb:2400 + def prefixes; end + + # pkg:gem/rexml#lib/rexml/element.rb:2219 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2196 + def to_a; end +end + +# pkg:gem/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 ) + # + # pkg:gem/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" + # + # pkg:gem/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" + # + # pkg:gem/rexml#lib/rexml/cdata.rb:35 + def to_s; end + + # pkg:gem/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 ) #-> + # + # pkg:gem/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. +# +# pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/child.rb:18 + def initialize(parent = T.unsafe(nil)); end + + # This doesn't yet handle encodings + # + # pkg:gem/rexml#lib/rexml/child.rb:90 + def bytes; end + + # Returns:: the document this child belongs to, or nil if this child + # belongs to no document + # + # pkg:gem/rexml#lib/rexml/child.rb:85 + def document; end + + # pkg:gem/rexml#lib/rexml/child.rb:58 + 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 + # # => + # + # pkg:gem/rexml#lib/rexml/child.rb:68 + def next_sibling=(other); end + + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/child.rb:52 + def parent=(other); end + + # pkg:gem/rexml#lib/rexml/child.rb:59 + 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 + # # => + # + # pkg:gem/rexml#lib/rexml/child.rb:79 + def previous_sibling=(other); end + + # Removes this child from the parent. + # + # Returns:: self + # + # pkg:gem/rexml#lib/rexml/child.rb:37 + def remove; end + + # Replaces this object with another object. Basically, calls + # Parent.replace_child + # + # Returns:: self + # + # pkg:gem/rexml#lib/rexml/child.rb:29 + def replace_with(child); end +end + +# Represents an XML comment; that is, text between \ +# +# pkg:gem/rexml#lib/rexml/comment.rb:7 +class REXML::Comment < ::REXML::Child + include ::Comparable + + # Constructor. The first argument can be one of three types: + # @param first If String, the contents of this comment are set to the + # argument. If Comment, the argument is duplicated. If + # Source, the argument is scanned for a comment. + # @param second If the first argument is a Source, this argument + # should be nil, not supplied, or a Parent to be set as the parent + # of this object + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/comment.rb:63 + def <=>(other); end + + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + # + # pkg:gem/rexml#lib/rexml/comment.rb:70 + def ==(other); end + + # pkg:gem/rexml#lib/rexml/comment.rb:33 + def clone; end + + # pkg:gem/rexml#lib/rexml/comment.rb:75 + def node_type; end + + # The content text + # + # pkg:gem/rexml#lib/rexml/comment.rb:14 + def string; end + + # The content text + # + # pkg:gem/rexml#lib/rexml/comment.rb:14 + def string=(_arg0); end + + # pkg:gem/rexml#lib/rexml/comment.rb:58 + 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. + # + # pkg:gem/rexml#lib/rexml/comment.rb:50 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# pkg:gem/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. +# +# pkg:gem/rexml#lib/rexml/doctype.rb:238 +class REXML::Declaration < ::REXML::Child + # pkg:gem/rexml#lib/rexml/doctype.rb:239 + def initialize(src); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:244 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # pkg:gem/rexml#lib/rexml/doctype.rb:251 + 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. +# +# pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/doctype.rb:80 + def initialize(first, parent = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:181 + def add(child); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:125 + def attribute_of(element, attribute); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:115 + def attributes_of(element); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:135 + def clone; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:173 + def context; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # pkg:gem/rexml#lib/rexml/doctype.rb:66 + def entities; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:177 + def entity(name); end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/doctype.rb:66 + def name; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # pkg:gem/rexml#lib/rexml/doctype.rb:66 + def namespaces; end + + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/doctype.rb:225 + 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 + # + # pkg:gem/rexml#lib/rexml/doctype.rb:217 + def notations; end + + # This method retrieves the public identifier identifying the document's + # DTD. + # + # Method contributed by Henrik Martensson + # + # pkg:gem/rexml#lib/rexml/doctype.rb:191 + def public; end + + # This method retrieves the system identifier identifying the document's DTD + # + # Method contributed by Henrik Martensson + # + # pkg:gem/rexml#lib/rexml/doctype.rb:203 + 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 + # + # pkg:gem/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]. +# +# pkg:gem/rexml#lib/rexml/document.rb:35 +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} + # + # pkg:gem/rexml#lib/rexml/document.rb:92 + def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/document.rb:205 + 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 # => "" + # + # pkg:gem/rexml#lib/rexml/document.rb:174 + 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) + # + # pkg:gem/rexml#lib/rexml/document.rb:213 + 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. + # + # pkg:gem/rexml#lib/rexml/document.rb:124 + 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 + # + # pkg:gem/rexml#lib/rexml/document.rb:245 + def doctype; end + + # pkg:gem/rexml#lib/rexml/document.rb:448 + 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" + # + # pkg:gem/rexml#lib/rexml/document.rb:294 + def encoding; end + + # pkg:gem/rexml#lib/rexml/document.rb:437 + def entity_expansion_count; end + + # pkg:gem/rexml#lib/rexml/document.rb:438 + def entity_expansion_limit=(_arg0); end + + # pkg:gem/rexml#lib/rexml/document.rb:439 + def entity_expansion_text_limit; end + + # pkg:gem/rexml#lib/rexml/document.rb:439 + def entity_expansion_text_limit=(_arg0); end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # + # pkg:gem/rexml#lib/rexml/document.rb:133 + def expanded_name; end + + # pkg:gem/rexml#lib/rexml/document.rb:138 + def name; end + + # :call-seq: + # node_type -> :document + # + # Returns the symbol +:document+. + # + # pkg:gem/rexml#lib/rexml/document.rb:114 + def node_type; end + + # pkg:gem/rexml#lib/rexml/document.rb:441 + 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 + # + # pkg:gem/rexml#lib/rexml/document.rb:229 + 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 + # + # pkg:gem/rexml#lib/rexml/document.rb:309 + 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" + # + # pkg:gem/rexml#lib/rexml/document.rb:279 + def version; end + + # :call-seq: + # doc.write(output=$stdout, indent=-1, transitive=false, ie_hack=false, encoding=nil) + # doc.write(options={:output => $stdout, :indent => -1, :transitive => 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. + # + # pkg:gem/rexml#lib/rexml/document.rb:369 + 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 # => "" + # + # pkg:gem/rexml#lib/rexml/document.rb:262 + def xml_decl; end + + private + + # pkg:gem/rexml#lib/rexml/document.rb:467 + def build(source); end + + # New document level cache is created and available in this block. + # This API is thread unsafe. Users can't change this document in this block. + # + # pkg:gem/rexml#lib/rexml/document.rb:458 + def enable_cache; end + + # pkg:gem/rexml#lib/rexml/document.rb:454 + def namespaces_cache; end + + # pkg:gem/rexml#lib/rexml/document.rb:454 + def namespaces_cache=(_arg0); end + + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # Deprecated. Use REXML::Security.entity_expansion_limit= instead. + # + # pkg:gem/rexml#lib/rexml/document.rb:419 + 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. + # + # pkg:gem/rexml#lib/rexml/document.rb:412 + 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. + # + # pkg:gem/rexml#lib/rexml/document.rb:433 + 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. + # + # pkg:gem/rexml#lib/rexml/document.rb:426 + def entity_expansion_text_limit=(val); end + + # pkg:gem/rexml#lib/rexml/document.rb:405 + 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. +# +# pkg:gem/rexml#lib/rexml/element.rb:271 +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} + # + # pkg:gem/rexml#lib/rexml/element.rb:319 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1238 + 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" + # + # pkg:gem/rexml#lib/rexml/element.rb:1336 + 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) + # + # pkg:gem/rexml#lib/rexml/element.rb:1367 + 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] # => + # + # pkg:gem/rexml#lib/rexml/element.rb:725 + 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"} + # + # pkg:gem/rexml#lib/rexml/element.rb:648 + 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"] + # + # pkg:gem/rexml#lib/rexml/element.rb:1139 + 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' + # + # pkg:gem/rexml#lib/rexml/element.rb:1279 + def attribute(name, namespace = T.unsafe(nil)); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # pkg:gem/rexml#lib/rexml/element.rb:278 + 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] + # + # pkg:gem/rexml#lib/rexml/element.rb:1411 + 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 # => + # + # pkg:gem/rexml#lib/rexml/element.rb:383 + 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"] + # + # pkg:gem/rexml#lib/rexml/element.rb:1432 + def comments; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # pkg:gem/rexml#lib/rexml/element.rb:281 + def context; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # pkg:gem/rexml#lib/rexml/element.rb:281 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1386 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:771 + 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 # => "" + # + # pkg:gem/rexml#lib/rexml/element.rb:680 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:475 + 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: + # + # ... + # ... + # ... + # + # + # pkg:gem/rexml#lib/rexml/element.rb:923 + 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: + # + # + # + # pkg:gem/rexml#lib/rexml/element.rb:840 + 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: + # + # ... + # + # pkg:gem/rexml#lib/rexml/element.rb:897 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:278 + 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') # => [ ... , ] + # + # pkg:gem/rexml#lib/rexml/element.rb:942 + 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!" + # + # pkg:gem/rexml#lib/rexml/element.rb:1045 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1306 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:787 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:995 + 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]. + # + # pkg:gem/rexml#lib/rexml/element.rb:512 + 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 # => " ... " + # + # pkg:gem/rexml#lib/rexml/element.rb:358 + 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 } # => ["", ""] + # + # pkg:gem/rexml#lib/rexml/element.rb:1453 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:619 + 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"} + # + # pkg:gem/rexml#lib/rexml/element.rb:590 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:956 + def next_element; end + + # :call-seq: + # node_type -> :element + # + # Returns symbol :element: + # + # d = REXML::Document.new('') + # a = d.root # => + # a.node_type # => :element + # + # pkg:gem/rexml#lib/rexml/element.rb:1160 + 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"] + # + # pkg:gem/rexml#lib/rexml/element.rb:564 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:972 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:532 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:443 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:422 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:1023 + 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 #-> '' + # + # pkg:gem/rexml#lib/rexml/element.rb:1081 + 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"] + # + # pkg:gem/rexml#lib/rexml/element.rb:1469 + 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. + # + # pkg:gem/rexml#lib/rexml/element.rb:489 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1495 + 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" + # + # pkg:gem/rexml#lib/rexml/element.rb:1184 + def xpath; end + + private + + # pkg:gem/rexml#lib/rexml/element.rb:1519 + def __to_xpath_helper(node); end + + # pkg:gem/rexml#lib/rexml/element.rb:1511 + def calculate_namespaces; end + + # A private helper method + # + # pkg:gem/rexml#lib/rexml/element.rb:1534 + def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# pkg:gem/rexml#lib/rexml/doctype.rb:257 +class REXML::ElementDecl < ::REXML::Declaration + # pkg:gem/rexml#lib/rexml/doctype.rb:258 + 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 # => # ... > +# +# pkg:gem/rexml#lib/rexml/element.rb:1589 +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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1602 + def initialize(parent); end + + # pkg:gem/rexml#lib/rexml/element.rb:1927 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1674 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1725 + 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} + # + # pkg:gem/rexml#lib/rexml/element.rb:1915 + 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] + # + # pkg:gem/rexml#lib/rexml/element.rb:1978 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1815 + 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') # => [] + # + # pkg:gem/rexml#lib/rexml/element.rb:1841 + 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'> ... </> + # + # pkg:gem/rexml#lib/rexml/element.rb:1957 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1745 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1763 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:2063 + 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 + # + # pkg:gem/rexml#lib/rexml/element.rb:1617 + 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.. + # + # pkg:gem/rexml#lib/rexml/element.rb:2087 + 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/>] + # + # pkg:gem/rexml#lib/rexml/element.rb:2111 + def to_a(xpath = T.unsafe(nil)); end + + private + + # Private helper class. Removes quotes from quoted strings + # + # pkg:gem/rexml#lib/rexml/element.rb:2119 + def literalize(name); end +end + +# pkg:gem/rexml#lib/rexml/encoding.rb:4 +module REXML::Encoding + # pkg:gem/rexml#lib/rexml/encoding.rb:26 + def decode(string); end + + # pkg:gem/rexml#lib/rexml/encoding.rb:22 + def encode(string); end + + # ID ---> Encoding name + # + # pkg:gem/rexml#lib/rexml/encoding.rb:6 + def encoding; end + + # pkg:gem/rexml#lib/rexml/encoding.rb:7 + def encoding=(encoding); end + + private + + # pkg:gem/rexml#lib/rexml/encoding.rb:31 + def find_encoding(name); end +end + +# pkg:gem/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', '&' ) + # + # pkg:gem/rexml#lib/rexml/entity.rb:34 + def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + def external; end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + def name; end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + 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 + # + # pkg:gem/rexml#lib/rexml/entity.rb:86 + def normalized; end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + def pubid; end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + def ref; end + + # Returns this entity as a string. See write(). + # + # pkg:gem/rexml#lib/rexml/entity.rb:120 + def to_s; end + + # Evaluates to the unnormalized value of this entity; that is, replacing + # &ent; entities. + # + # pkg:gem/rexml#lib/rexml/entity.rb:73 + def unnormalized; end + + # pkg:gem/rexml#lib/rexml/entity.rb:23 + 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 + # + # pkg:gem/rexml#lib/rexml/entity.rb:98 + def write(out, indent = T.unsafe(nil)); end + + class << self + # Evaluates whether the given string matches an entity definition, + # returning true if so, and false otherwise. + # + # pkg:gem/rexml#lib/rexml/entity.rb:67 + def matches?(string); end + end +end + +# pkg:gem/rexml#lib/rexml/doctype.rb:263 +class REXML::ExternalEntity < ::REXML::Child + # pkg:gem/rexml#lib/rexml/doctype.rb:264 + def initialize(src); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:268 + def to_s; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:271 + def write(output, indent); end +end + +# pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/formatters/default.rb:23 + def write(node, output); end + + protected + + # pkg:gem/rexml#lib/rexml/formatters/default.rb:98 + def write_cdata(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/default.rb:92 + def write_comment(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/default.rb:61 + def write_document(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/default.rb:65 + def write_element(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/default.rb:104 + def write_instruction(node, output); end + + # pkg:gem/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 +# +# pkg:gem/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. + # + # pkg:gem/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 + # + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:14 + def compact=(_arg0); end + + # The width of a page. Used for formatting text + # + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:16 + def width; end + + # The width of a page. Used for formatting text + # + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:16 + def width=(_arg0); end + + protected + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:102 + def write_cdata(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:97 + def write_comment(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:107 + def write_document(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:39 + def write_element(node, output); end + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:88 + def write_text(node, output); end + + private + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:124 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/formatters/pretty.rb:129 + def wrap(string, width); end +end + +# If you add a method, keep in mind two things: +# (1) the first argument will always be a list of nodes from which to +# filter. In the case of context methods (such as position), the function +# should return an array with a value for each child in the array. +# (2) all method calls from XML will have "-" replaced with "_". +# Therefore, in XML, "local-name()" is identical (and actually becomes) +# "local_name()" +# +# pkg:gem/rexml#lib/rexml/functions.rb:10 +module REXML::Functions + class << self + # pkg:gem/rexml#lib/rexml/functions.rb:317 + def boolean(object = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:417 + def ceiling(number); end + + # pkg:gem/rexml#lib/rexml/functions.rb:370 + def compare_language(lang1, lang2); end + + # pkg:gem/rexml#lib/rexml/functions.rb:190 + def concat(*objects); end + + # Fixed by Mike Stok + # + # pkg:gem/rexml#lib/rexml/functions.rb:204 + def contains(string, test); end + + # pkg:gem/rexml#lib/rexml/functions.rb:38 + def context=(value); end + + # Returns the size of the given list of nodes. + # + # pkg:gem/rexml#lib/rexml/functions.rb:60 + def count(node_set); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:347 + def false; end + + # pkg:gem/rexml#lib/rexml/functions.rb:413 + def floor(number); end + + # Helper method. + # + # pkg:gem/rexml#lib/rexml/functions.rb:87 + def get_namespace(node_set = T.unsafe(nil)); end + + # Since REXML is non-validating, this method is not implemented as it + # requires a DTD + # + # pkg:gem/rexml#lib/rexml/functions.rb:66 + def id(object); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:352 + def lang(language); end + + # Returns the last node of the given list of nodes. + # + # pkg:gem/rexml#lib/rexml/functions.rb:51 + def last; end + + # pkg:gem/rexml#lib/rexml/functions.rb:69 + def local_name(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:80 + def name(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:35 + def namespace_context; end + + # pkg:gem/rexml#lib/rexml/functions.rb:33 + def namespace_context=(x); end + + # pkg:gem/rexml#lib/rexml/functions.rb:76 + def namespace_uri(node_set = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:265 + def normalize_space(string = T.unsafe(nil)); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:337 + def not(object); end + + # a string that consists of optional whitespace followed by an optional + # minus sign followed by a Number followed by whitespace is converted to + # the IEEE 754 number that is nearest (according to the IEEE 754 + # round-to-nearest rule) to the mathematical value represented by the + # string; any other string is converted to NaN + # + # boolean true is converted to 1; boolean false is converted to 0 + # + # a node-set is first converted to a string as if by a call to the string + # function and then converted in the same way as a string argument + # + # an object of a type other than the four basic types is converted to a + # number in a way that is dependent on that type + # + # pkg:gem/rexml#lib/rexml/functions.rb:387 + def number(object = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/functions.rb:55 + def position; end + + # pkg:gem/rexml#lib/rexml/functions.rb:432 + def processing_instruction(node); end + + # pkg:gem/rexml#lib/rexml/functions.rb:421 + def round(number); end + + # pkg:gem/rexml#lib/rexml/functions.rb:436 + def send(name, *args); end + + # pkg:gem/rexml#lib/rexml/functions.rb:26 + def singleton_method_added(name); end + + # Fixed by Mike Stok + # + # pkg:gem/rexml#lib/rexml/functions.rb:199 + def starts_with(string, test); end + + # A node-set is converted to a string by returning the string-value of the + # node in the node-set that is first in document order. If the node-set is + # empty, an empty string is returned. + # + # A number is converted to a string as follows + # + # NaN is converted to the string NaN + # + # positive zero is converted to the string 0 + # + # negative zero is converted to the string 0 + # + # positive infinity is converted to the string Infinity + # + # negative infinity is converted to the string -Infinity + # + # if the number is an integer, the number is represented in decimal form + # as a Number with no decimal point and no leading zeros, preceded by a + # minus sign (-) if the number is negative + # + # otherwise, the number is represented in decimal form as a Number + # including a decimal point with at least one digit before the decimal + # point and at least one digit after the decimal point, preceded by a + # minus sign (-) if the number is negative; there must be no leading zeros + # before the decimal point apart possibly from the one required digit + # immediately before the decimal point; beyond the one required digit + # after the decimal point there must be as many, but only as many, more + # digits as are needed to uniquely distinguish the number from all other + # IEEE 754 numeric values. + # + # The boolean false value is converted to the string false. The boolean + # true value is converted to the string true. + # + # An object of a type other than the four basic types is converted to a + # string in a way that is dependent on that type. + # + # pkg:gem/rexml#lib/rexml/functions.rb:138 + def string(object = T.unsafe(nil)); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:261 + def string_length(string); end + + # A node-set is converted to a string by + # returning the concatenation of the string-value + # of each of the children of the node in the + # node-set that is first in document order. + # If the node-set is empty, an empty string is returned. + # + # pkg:gem/rexml#lib/rexml/functions.rb:178 + def string_value(o); end + + # Take equal portions of Mike Stok and Sean Russell; mix + # vigorously, and pour into a tall, chilled glass. Serves 10,000. + # + # pkg:gem/rexml#lib/rexml/functions.rb:228 + def substring(string, start, length = T.unsafe(nil)); end + + # Kouhei fixed this too + # + # pkg:gem/rexml#lib/rexml/functions.rb:220 + def substring_after(string, test); end + + # Kouhei fixed this + # + # pkg:gem/rexml#lib/rexml/functions.rb:209 + def substring_before(string, test); end + + # pkg:gem/rexml#lib/rexml/functions.rb:408 + def sum(nodes); end + + # pkg:gem/rexml#lib/rexml/functions.rb:40 + def text; end + + # This is entirely Mike Stok's beast + # + # pkg:gem/rexml#lib/rexml/functions.rb:275 + def translate(string, tr1, tr2); end + + # UNTESTED + # + # pkg:gem/rexml#lib/rexml/functions.rb:342 + def true; end + + # pkg:gem/rexml#lib/rexml/functions.rb:36 + def variables; end + + # pkg:gem/rexml#lib/rexml/functions.rb:34 + def variables=(x); end + end +end + +# A Source that wraps an IO. See the Source class for method +# documentation +# +# pkg:gem/rexml#lib/rexml/source.rb:220 +class REXML::IOSource < ::REXML::Source + # block_size has been deprecated + # + # pkg:gem/rexml#lib/rexml/source.rb:224 + def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # @return the current line in the source + # + # pkg:gem/rexml#lib/rexml/source.rb:329 + def current_line; end + + # pkg:gem/rexml#lib/rexml/source.rb:324 + def empty?; end + + # pkg:gem/rexml#lib/rexml/source.rb:284 + def ensure_buffer; end + + # pkg:gem/rexml#lib/rexml/source.rb:288 + def match(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:307 + def match?(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:245 + def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:266 + def read_until(term); end + + private + + # pkg:gem/rexml#lib/rexml/source.rb:376 + def encoding_updated; end + + # pkg:gem/rexml#lib/rexml/source.rb:351 + def readline(term = T.unsafe(nil)); end +end + +# Represents an XML Instruction; IE, <? ... ?> +# TODO: Add parent arg (3rd arg) to constructor +# +# pkg:gem/rexml#lib/rexml/instruction.rb:9 +class REXML::Instruction < ::REXML::Child + # Constructs a new Instruction + # @param target can be one of a number of things. If String, then + # the target of this instruction is set to this. If an Instruction, + # then the Instruction is shallowly cloned (target and content are + # copied). + # @param content Must be either a String, or a Parent. Can only + # be a Parent if the target argument is a Source. Otherwise, this + # String is set as the content of this instruction. + # + # pkg:gem/rexml#lib/rexml/instruction.rb:25 + def initialize(target, content = T.unsafe(nil)); end + + # @return true if other is an Instruction, and the content and target + # of the other matches the target and content of this object. + # + # pkg:gem/rexml#lib/rexml/instruction.rb:65 + def ==(other); end + + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/instruction.rb:15 + def content=(_arg0); end + + # pkg:gem/rexml#lib/rexml/instruction.rb:75 + def inspect; end + + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/instruction.rb:15 + def target=(_arg0); end + + # == DEPRECATED + # See the rexml/formatters package + # + # pkg:gem/rexml#lib/rexml/instruction.rb:51 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# Adds named attributes to an object. +# +# pkg:gem/rexml#lib/rexml/namespace.rb:7 +module REXML::Namespace + include ::REXML::XMLTokens + + # The name of the object, valid if set + # + # pkg:gem/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. + # + # pkg:gem/rexml#lib/rexml/namespace.rb:57 + def fully_expanded_name; end + + # Compares names optionally WITH namespaces + # + # pkg:gem/rexml#lib/rexml/namespace.rb:43 + def has_name?(other, ns = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/namespace.rb:53 + def local_name; end + + # The name of the object, valid if set + # + # pkg:gem/rexml#lib/rexml/namespace.rb:9 + def name; end + + # Sets the name and the expanded name + # + # pkg:gem/rexml#lib/rexml/namespace.rb:17 + def name=(name); end + + # The expanded name of the object, valid if name is set + # + # pkg:gem/rexml#lib/rexml/namespace.rb:11 + def prefix; end + + # The expanded name of the object, valid if name is set + # + # pkg:gem/rexml#lib/rexml/namespace.rb:11 + def prefix=(_arg0); end +end + +# pkg:gem/rexml#lib/rexml/namespace.rb:13 +REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) + +# Represents a node in the tree. Nodes are never encountered except as +# superclasses of other objects. Nodes have siblings. +# +# pkg:gem/rexml#lib/rexml/node.rb:9 +module REXML::Node + # Visit all subnodes of +self+ recursively + # + # pkg:gem/rexml#lib/rexml/node.rb:54 + def each_recursive(&block); end + + # Find (and return) first subnode (recursively) for which the block + # evaluates to true. Returns +nil+ if none was found. + # + # pkg:gem/rexml#lib/rexml/node.rb:67 + def find_first_recursive(&block); end + + # pkg:gem/rexml#lib/rexml/node.rb:39 + def indent(to, ind); end + + # Returns the position that +self+ holds in its parent's array, indexed + # from 1. + # + # pkg:gem/rexml#lib/rexml/node.rb:76 + def index_in_parent; end + + # @return the next sibling (nil if unset) + # + # pkg:gem/rexml#lib/rexml/node.rb:11 + def next_sibling_node; end + + # pkg:gem/rexml#lib/rexml/node.rb:48 + def parent?; end + + # @return the previous sibling (nil if unset) + # + # pkg:gem/rexml#lib/rexml/node.rb:17 + def previous_sibling_node; end + + # indent:: + # *DEPRECATED* This parameter is now ignored. See the formatters in the + # REXML::Formatters package for changing the output style. + # + # pkg:gem/rexml#lib/rexml/node.rb:27 + def to_s(indent = T.unsafe(nil)); end +end + +# pkg:gem/rexml#lib/rexml/doctype.rb:276 +class REXML::NotationDecl < ::REXML::Child + # pkg:gem/rexml#lib/rexml/doctype.rb:278 + def initialize(name, middle, pub, sys); end + + # This method retrieves the name of the notation. + # + # Method contributed by Henrik Martensson + # + # pkg:gem/rexml#lib/rexml/doctype.rb:302 + def name; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:277 + def public; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:277 + def public=(_arg0); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:277 + def system; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:277 + def system=(_arg0); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:286 + def to_s; end + + # pkg:gem/rexml#lib/rexml/doctype.rb:295 + def write(output, indent = T.unsafe(nil)); end +end + +# pkg:gem/rexml#lib/rexml/output.rb:5 +class REXML::Output + include ::REXML::Encoding + + # pkg:gem/rexml#lib/rexml/output.rb:10 + def initialize(real_IO, encd = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/output.rb:22 + def <<(content); end + + # pkg:gem/rexml#lib/rexml/output.rb:8 + def encoding; end + + # pkg:gem/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. +# +# pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/parent.rb:13 + def initialize(parent = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parent.rb:25 + def <<(object); end + + # Fetches a child at a given index + # @param index the Integer index of the child to fetch + # + # pkg:gem/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) + # + # pkg:gem/rexml#lib/rexml/parent.rb:70 + def []=(*args); end + + # pkg:gem/rexml#lib/rexml/parent.rb:18 + def add(object); end + + # pkg:gem/rexml#lib/rexml/parent.rb:160 + def children; end + + # Deeply clones this object. This creates a complete duplicate of this + # Parent, including all descendants. + # + # pkg:gem/rexml#lib/rexml/parent.rb:148 + def deep_clone; end + + # pkg:gem/rexml#lib/rexml/parent.rb:32 + def delete(object); end + + # pkg:gem/rexml#lib/rexml/parent.rb:47 + def delete_at(index); end + + # pkg:gem/rexml#lib/rexml/parent.rb:43 + def delete_if(&block); end + + # pkg:gem/rexml#lib/rexml/parent.rb:39 + def each(&block); end + + # pkg:gem/rexml#lib/rexml/parent.rb:61 + def each_child(&block); end + + # pkg:gem/rexml#lib/rexml/parent.rb:51 + def each_index(&block); end + + # Fetches the index of a given child + # @param child the child to get the index of + # @return the index of the child, or nil if the object is not a child + # of this parent. + # + # pkg:gem/rexml#lib/rexml/parent.rb:123 + def index(child); end + + # Inserts an child after another child + # @param child1 this is either an xpath or an Element. If an Element, + # 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 child2 the child to insert + # @return the parent (self) + # + # pkg:gem/rexml#lib/rexml/parent.rb:102 + def insert_after(child1, child2); end + + # Inserts an child before another child + # @param child1 this is either an xpath or an Element. If an Element, + # 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 child2 the child to insert + # @return the parent (self) + # + # pkg:gem/rexml#lib/rexml/parent.rb:82 + def insert_before(child1, child2); end + + # pkg:gem/rexml#lib/rexml/parent.rb:134 + def length; end + + # pkg:gem/rexml#lib/rexml/parent.rb:162 + def parent?; end + + # pkg:gem/rexml#lib/rexml/parent.rb:24 + def push(object); end + + # Replaces one child with another, making sure the nodelist is correct + # @param to_replace the child to replace (must be a Child) + # @param replacement the child to insert into the nodelist (must be a + # Child) + # + # pkg:gem/rexml#lib/rexml/parent.rb:140 + def replace_child(to_replace, replacement); end + + # @return the number of children of this parent + # + # pkg:gem/rexml#lib/rexml/parent.rb:130 + def size; end + + # pkg:gem/rexml#lib/rexml/parent.rb:115 + def to_a; end + + # pkg:gem/rexml#lib/rexml/parent.rb:27 + def unshift(object); end +end + +# pkg:gem/rexml#lib/rexml/parseexception.rb:3 +class REXML::ParseException < ::RuntimeError + # pkg:gem/rexml#lib/rexml/parseexception.rb:6 + def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:49 + def context; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def continued_exception; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def continued_exception=(_arg0); end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:44 + def line; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def parser; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def parser=(_arg0); end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:39 + def position; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def source; end + + # pkg:gem/rexml#lib/rexml/parseexception.rb:4 + def source=(_arg0); end + + # pkg:gem/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. +# +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:57 +class REXML::Parsers::BaseParser + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:164 + def initialize(source); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:175 + def add_listener(listener); end + + # Returns true if there are no more events + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:210 + def empty?; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:537 + def entity(reference, entities); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:180 + def entity_expansion_count; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:181 + def entity_expansion_limit=(_arg0); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:182 + def entity_expansion_text_limit=(_arg0); end + + # Returns true if there are more events. Synonymous with !empty? + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:215 + def has_next?; end + + # Escapes all possible entities + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:548 + 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. + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:231 + def peek(depth = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:200 + def position; end + + # Returns the next event. This is a +PullEvent+ object. + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:246 + def pull; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:189 + def reset; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:179 + def source; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:184 + def stream=(source); end + + # Unescapes all possible entities + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:564 + 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. + # + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:221 + def unshift(token); end + + private + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:613 + def add_namespace(prefix, uri); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:646 + def need_source_encoding_update?(xml_declaration_encoding); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:652 + def normalize_xml_declaration_encoding(xml_declaration_encoding); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:849 + def parse_attribute_value_with_equal(name); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:868 + def parse_attributes(prefixes); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:669 + def parse_id(base_error_message, accept_external_id:, accept_public_id:); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:697 + def parse_id_invalid_details(accept_external_id:, accept_public_id:); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:656 + def parse_name(base_error_message); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:628 + def pop_namespaces_restore; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:735 + def process_comment; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:747 + def process_instruction; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:256 + def pull_event; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:622 + def push_namespaces_restore; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:639 + def record_entity_expansion(delta = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:835 + def scan_quote; end + + # pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:769 + def xml_declaration; end +end + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:130 +REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:131 +REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:132 +REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:143 +module REXML::Parsers::BaseParser::Private; end + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:148 +REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:153 +REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:154 +REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:146 +REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:155 +REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:152 +REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:147 +REXML::Parsers::BaseParser::Private::EQUAL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:150 +REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:149 +REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:151 +REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:144 +REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:145 +REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:160 +REXML::Parsers::BaseParser::Private::XML_PREFIXED_NAMESPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:66 +REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/parsers/baseparser.rb:65 +REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) + +# pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:6 +class REXML::Parsers::StreamParser + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:7 + def initialize(source, listener); end + + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:13 + def add_listener(listener); end + + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:17 + def entity_expansion_count; end + + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:21 + def entity_expansion_limit=(limit); end + + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:25 + def entity_expansion_text_limit=(limit); end + + # pkg:gem/rexml#lib/rexml/parsers/streamparser.rb:29 + def parse; end +end + +# pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:7 +class REXML::Parsers::TreeParser + # pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:8 + def initialize(source, build_context = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/parsers/treeparser.rb:13 + def add_listener(listener); end + + # pkg:gem/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! +# +# pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:12 +class REXML::Parsers::XPathParser + include ::REXML::XMLTokens + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:42 + def abbreviate(path_or_parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:132 + def expand(path_or_parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:16 + def namespaces=(namespaces); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:21 + def parse(path); end + + # For backward compatibility + # + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:221 + def preciate_to_string(parsed, &block); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:36 + def predicate(path); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:174 + def predicate_to_path(parsed, &block); end + + private + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:505 + def AdditiveExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:438 + def AndExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:457 + def EqualityExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:608 + def FilterExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:663 + def FunctionCall(rest, parsed); end + + # LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath + # + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:243 + def LocationPath(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:528 + def MultiplicativeExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:343 + def NodeTest(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:419 + def OrExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:590 + def PathExpr(path, parsed); end + + # Filters the supplied nodeset on the predicate(s) + # + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:395 + def Predicate(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:626 + def PrimaryExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:480 + def RelationalExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:267 + def RelativeLocationPath(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:553 + def UnaryExpr(path, parsed); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:571 + def UnionExpr(path, parsed); end + + # get_group( '[foo]bar' ) -> ['bar', '[foo]'] + # + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:676 + def get_group(string); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:694 + def parse_args(string); end + + # pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:224 + def quote_literal(literal); end +end + +# pkg:gem/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 +# +# pkg:gem/rexml#lib/rexml/parsers/xpathparser.rb:338 +REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rexml#lib/rexml/doctype.rb:10 +class REXML::ReferenceWriter + # pkg:gem/rexml#lib/rexml/doctype.rb:11 + def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/doctype.rb:25 + def write(output); end +end + +# pkg:gem/rexml#lib/rexml/security.rb:3 +module REXML::Security + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # pkg:gem/rexml#lib/rexml/security.rb:12 + def entity_expansion_limit; end + + # Set the entity expansion limit. By default the limit is set to 10000. + # + # pkg:gem/rexml#lib/rexml/security.rb:7 + def entity_expansion_limit=(val); end + + # Get the entity expansion limit. By default the limit is set to 10240. + # + # pkg:gem/rexml#lib/rexml/security.rb:24 + def entity_expansion_text_limit; end + + # Set the entity expansion limit. By default the limit is set to 10240. + # + # pkg:gem/rexml#lib/rexml/security.rb:19 + def entity_expansion_text_limit=(val); end + end +end + +# A Source can be searched for patterns, and wraps buffers and other +# objects and provides consumption of text +# +# pkg:gem/rexml#lib/rexml/source.rb:61 +class REXML::Source + include ::REXML::Encoding + + # Constructor + # @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 + # value, overriding all encoding detection + # + # pkg:gem/rexml#lib/rexml/source.rb:88 + def initialize(arg, encoding = T.unsafe(nil)); end + + # The current buffer (what we're going to read next) + # + # pkg:gem/rexml#lib/rexml/source.rb:101 + def buffer; end + + # pkg:gem/rexml#lib/rexml/source.rb:111 + def buffer_encoding=(encoding); end + + # @return the current line in the source + # + # pkg:gem/rexml#lib/rexml/source.rb:180 + def current_line; end + + # pkg:gem/rexml#lib/rexml/source.rb:105 + def drop_parsed_content; end + + # @return true if the Source is exhausted + # + # pkg:gem/rexml#lib/rexml/source.rb:175 + def empty?; end + + # pkg:gem/rexml#lib/rexml/source.rb:65 + def encoding; end + + # Inherited from Encoding + # Overridden to support optimized en/decoding + # + # pkg:gem/rexml#lib/rexml/source.rb:117 + def encoding=(enc); end + + # pkg:gem/rexml#lib/rexml/source.rb:135 + def ensure_buffer; end + + # The line number of the last consumed text + # + # pkg:gem/rexml#lib/rexml/source.rb:64 + def line; end + + # pkg:gem/rexml#lib/rexml/source.rb:138 + def match(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:146 + def match?(pattern, cons = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:166 + def peek_byte; end + + # pkg:gem/rexml#lib/rexml/source.rb:158 + def position; end + + # pkg:gem/rexml#lib/rexml/source.rb:162 + def position=(pos); end + + # pkg:gem/rexml#lib/rexml/source.rb:122 + def read(term = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/source.rb:125 + def read_until(term); end + + # pkg:gem/rexml#lib/rexml/source.rb:170 + def scan_byte; end + + # pkg:gem/rexml#lib/rexml/source.rb:154 + def skip_spaces; end + + private + + # pkg:gem/rexml#lib/rexml/source.rb:189 + def detect_encoding; end + + # pkg:gem/rexml#lib/rexml/source.rb:207 + def encoding_updated; end +end + +# pkg:gem/rexml#lib/rexml/source.rb:67 +module REXML::Source::Private; end + +# pkg:gem/rexml#lib/rexml/source.rb:70 +REXML::Source::Private::PRE_DEFINED_TERM_PATTERNS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rexml#lib/rexml/source.rb:69 +REXML::Source::Private::SCANNER_RESET_SIZE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rexml#lib/rexml/source.rb:68 +REXML::Source::Private::SPACES_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Generates Source-s. USE THIS CLASS. +# +# pkg:gem/rexml#lib/rexml/source.rb:38 +class REXML::SourceFactory + class << self + # Generates a Source object + # @param arg Either a String, or an IO + # @return a Source, or nil if a bad argument was given + # + # pkg:gem/rexml#lib/rexml/source.rb:42 + def create_from(arg); end + end +end + +# Represents text nodes in an XML document +# +# pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/text.rb:79 + 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"'. + # + # pkg:gem/rexml#lib/rexml/text.rb:189 + def <<(to_append); end + + # +other+ a String or a Text + # +returns+ the result of (to_s <=> arg.to_s) + # + # pkg:gem/rexml#lib/rexml/text.rb:198 + def <=>(other); end + + # pkg:gem/rexml#lib/rexml/text.rb:179 + def clone; end + + # pkg:gem/rexml#lib/rexml/text.rb:202 + def doctype; end + + # pkg:gem/rexml#lib/rexml/text.rb:174 + def empty?; end + + # pkg:gem/rexml#lib/rexml/text.rb:271 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/text.rb:225 + def inspect; end + + # pkg:gem/rexml#lib/rexml/text.rb:170 + def node_type; end + + # pkg:gem/rexml#lib/rexml/text.rb:110 + def parent=(parent); end + + # If +raw+ is true, then REXML leaves the value alone + # + # pkg:gem/rexml#lib/rexml/text.rb:21 + def raw; end + + # If +raw+ is true, then REXML leaves the value alone + # + # pkg:gem/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" + # + # pkg:gem/rexml#lib/rexml/text.rb:220 + 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" + # + # pkg:gem/rexml#lib/rexml/text.rb:242 + 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> + # + # pkg:gem/rexml#lib/rexml/text.rb:254 + def value=(val); end + + # pkg:gem/rexml#lib/rexml/text.rb:260 + def wrap(string, width, addnewline = T.unsafe(nil)); end + + # == DEPRECATED + # See REXML::Formatters + # + # pkg:gem/rexml#lib/rexml/text.rb:288 + 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 + # + # pkg:gem/rexml#lib/rexml/text.rb:318 + def write_with_substitution(out, input); end + + # FIXME + # This probably won't work properly + # + # pkg:gem/rexml#lib/rexml/text.rb:300 + def xpath; end + + private + + # pkg:gem/rexml#lib/rexml/text.rb:331 + def clear_cache; end + + class << self + # check for illegal characters + # + # pkg:gem/rexml#lib/rexml/text.rb:116 + def check(string, pattern, doctype = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/text.rb:401 + def expand(ref, doctype, filter); end + + # Escapes all possible entities + # + # pkg:gem/rexml#lib/rexml/text.rb:363 + def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Reads text, substituting entities + # + # pkg:gem/rexml#lib/rexml/text.rb:337 + def read_with_substitution(input, illegal = T.unsafe(nil)); end + + # Unescapes all possible entities + # + # pkg:gem/rexml#lib/rexml/text.rb:387 + def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil), entity_expansion_text_limit: T.unsafe(nil)); end + end +end + +# pkg:gem/rexml#lib/rexml/undefinednamespaceexception.rb:4 +class REXML::UndefinedNamespaceException < ::REXML::ParseException + # pkg:gem/rexml#lib/rexml/undefinednamespaceexception.rb:5 + def initialize(prefix, source, parser); end +end + +# pkg:gem/rexml#lib/rexml/validation/validationexception.rb:4 +class REXML::Validation::ValidationException < ::RuntimeError + # pkg:gem/rexml#lib/rexml/validation/validationexception.rb:5 + def initialize(msg); end +end + +# NEEDS DOCUMENTATION +# +# pkg:gem/rexml#lib/rexml/xmldecl.rb:8 +class REXML::XMLDecl < ::REXML::Child + include ::REXML::Encoding + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:20 + def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:56 + def ==(other); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:39 + def clone; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:102 + def dowrite; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:76 + def encoding=(enc); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:106 + def inspect; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:69 + def node_type; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:98 + def nowrite; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:74 + def old_enc=(encoding); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:73 + def stand_alone?; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 + def standalone; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 + def standalone=(_arg0); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:17 + def version; end + + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/xmldecl.rb:49 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:18 + def writeencoding; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:18 + def writethis; end + + # pkg:gem/rexml#lib/rexml/xmldecl.rb:63 + def xmldecl(version, encoding, standalone); end + + private + + # pkg:gem/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 + # + # pkg:gem/rexml#lib/rexml/xmldecl.rb:92 + def default; end + end +end + +# Wrapper class. Use this class to access the XPath functions. +# +# pkg:gem/rexml#lib/rexml/xpath.rb:7 +class REXML::XPath + include ::REXML::Functions + + class << self + # Iterates over nodes that match the given path, calling the supplied + # block with the match. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, defaults to '*' + # namespaces:: + # If supplied, a Hash which defines a namespace mapping + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.each( node ) { |el| ... } + # XPath.each( node, '/*[@attr='v']' ) { |el| ... } + # XPath.each( node, 'ancestor::x' ) { |el| ... } + # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \ + # {|el| ... } + # + # pkg:gem/rexml#lib/rexml/xpath.rb:55 + def each(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds and returns the first node that matches the supplied xpath. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, returns the first + # node matching '*'. + # namespaces:: + # If supplied, a Hash which defines a namespace mapping. + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.first( node ) + # XPath.first( doc, "//b"} ) + # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) + # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) + # + # pkg:gem/rexml#lib/rexml/xpath.rb:31 + def first(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns an array of nodes matching a given XPath. + # + # pkg:gem/rexml#lib/rexml/xpath.rb:62 + def match(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# @private +# +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:965 +class REXML::XPathNode + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:967 + def initialize(node, context = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:966 + def context; end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:976 + def position; end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:966 + 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! +# +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:54 +class REXML::XPathParser + include ::REXML::XMLTokens + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:60 + def initialize(strict: T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:107 + 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! + # + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:116 + def first(path_stack, node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:97 + def get_first(path, node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:153 + def match(path_stack, node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:69 + def namespaces=(namespaces = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:79 + def parse(path, node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:102 + def predicate(path, node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:74 + def variables=(vars = T.unsafe(nil)); end + + private + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:781 + def child(nodeset); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:922 + def compare(a, operator, b); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:687 + def descendant(nodeset, include_self); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:698 + def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:944 + def each_unnode(nodeset); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:646 + def enter(tag, *args); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:821 + def equality_relational_compare(set1, op, set2); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:596 + 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 + # + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:186 + def expr(path_stack, nodeset, context = T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:587 + def filter_nodeset(nodeset); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:754 + def following(node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:765 + 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 + # + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:174 + def get_namespace(node, prefix); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:651 + def leave(tag, *args); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:771 + def next_sibling_node(node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:488 + def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:808 + def norm(b); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:896 + 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 + # + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:717 + def preceding(node); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:739 + 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. + # + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:664 + def sort(array_of_nodes, order); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:452 + def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:165 + def strict?; end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:639 + def trace(*args); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:956 + def unnode(nodeset); end + + # pkg:gem/rexml#lib/rexml/xpath_parser.rb:883 + def value_type(value); end +end + +# pkg:gem/rexml#lib/rexml/xpath_parser.rb:58 +REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rubocop-ast@1.15.1.rbi b/sorbet/rbi/gems/rubocop-ast@1.15.1.rbi deleted file mode 100644 index c008e44c..00000000 --- a/sorbet/rbi/gems/rubocop-ast@1.15.1.rbi +++ /dev/null @@ -1,1923 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-ast` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-ast`. - -module RuboCop; end - -module RuboCop::AST - extend ::RuboCop::AST::RuboCopCompatibility -end - -class RuboCop::AST::AliasNode < ::RuboCop::AST::Node - def new_identifier; end - def old_identifier; end -end - -class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode - def operator; end -end - -class RuboCop::AST::AndNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - def alternate_operator; end - def inverse_operator; end -end - -class RuboCop::AST::ArgNode < ::RuboCop::AST::Node - def default?; end - def default_value; end - def name; end -end - -class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - def argument_list; end - def empty_and_without_delimiters?; end -end - -class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node - def bracketed?; end - def each_value(&block); end - def percent_literal?(type = T.unsafe(nil)); end - def square_brackets?; end - def values; end -end - -RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node - def expression; end - def name; end -end - -module RuboCop::AST::BasicLiteralNode - def value; end -end - -module RuboCop::AST::BinaryOperatorNode - def conditions; end - def lhs; end - def rhs; end -end - -class RuboCop::AST::BlockNode < ::RuboCop::AST::Node - include ::RuboCop::AST::MethodIdentifierPredicates - - def argument_list; end - def arguments; end - def arguments?; end - def body; end - def braces?; end - def closing_delimiter; end - def delimiters; end - def keywords?; end - def lambda?; end - def method_name; end - def multiline?; end - def opening_delimiter; end - def send_node; end - def single_line?; end - def void_context?; end - - private - - def numbered_arguments; end -end - -RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::AST::BreakNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -class RuboCop::AST::Builder < ::Parser::Builders::Default - def n(type, children, source_map); end - def string_value(token); end - - private - - def node_klass(type); end -end - -RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - def branches; end - def each_in_pattern(&block); end - def else?; end - def else_branch; end - def in_pattern_branches; end - def keyword; end -end - -class RuboCop::AST::CaseNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - def branches; end - def each_when(&block); end - def else?; end - def else_branch; end - def keyword; end - def when_branches; end -end - -class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node - def expression; end - def name; end - def namespace; end -end - -class RuboCop::AST::ClassNode < ::RuboCop::AST::Node - def body; end - def identifier; end - def parent_class; end -end - -module RuboCop::AST::CollectionNode - extend ::Forwardable - - def &(*args, **_arg1_arg1, &block); end - def *(*args, **_arg1_arg1, &block); end - def +(*args, **_arg1_arg1, &block); end - def -(*args, **_arg1_arg1, &block); end - def <<(*args, **_arg1_arg1, &block); end - def [](*args, **_arg1_arg1, &block); end - def []=(*args, **_arg1_arg1, &block); end - def all?(*args, **_arg1_arg1, &block); end - def any?(*args, **_arg1_arg1, &block); end - def append(*args, **_arg1_arg1, &block); end - def assoc(*args, **_arg1_arg1, &block); end - def at(*args, **_arg1_arg1, &block); end - def bsearch(*args, **_arg1_arg1, &block); end - def bsearch_index(*args, **_arg1_arg1, &block); end - def chain(*args, **_arg1_arg1, &block); end - def chunk(*args, **_arg1_arg1, &block); end - def chunk_while(*args, **_arg1_arg1, &block); end - def clear(*args, **_arg1_arg1, &block); end - def collect(*args, **_arg1_arg1, &block); end - def collect!(*args, **_arg1_arg1, &block); end - def collect_concat(*args, **_arg1_arg1, &block); end - def combination(*args, **_arg1_arg1, &block); end - def compact(*args, **_arg1_arg1, &block); end - def compact!(*args, **_arg1_arg1, &block); end - def concat(*args, **_arg1_arg1, &block); end - def count(*args, **_arg1_arg1, &block); end - def cycle(*args, **_arg1_arg1, &block); end - def deconstruct(*args, **_arg1_arg1, &block); end - def delete(*args, **_arg1_arg1, &block); end - def delete_at(*args, **_arg1_arg1, &block); end - def delete_if(*args, **_arg1_arg1, &block); end - def detect(*args, **_arg1_arg1, &block); end - def difference(*args, **_arg1_arg1, &block); end - def dig(*args, **_arg1_arg1, &block); end - def drop(*args, **_arg1_arg1, &block); end - def drop_while(*args, **_arg1_arg1, &block); end - def each(*args, **_arg1_arg1, &block); end - def each_cons(*args, **_arg1_arg1, &block); end - def each_entry(*args, **_arg1_arg1, &block); end - def each_index(*args, **_arg1_arg1, &block); end - def each_slice(*args, **_arg1_arg1, &block); end - def each_with_index(*args, **_arg1_arg1, &block); end - def each_with_object(*args, **_arg1_arg1, &block); end - def empty?(*args, **_arg1_arg1, &block); end - def entries(*args, **_arg1_arg1, &block); end - def fetch(*args, **_arg1_arg1, &block); end - def fill(*args, **_arg1_arg1, &block); end - def filter(*args, **_arg1_arg1, &block); end - def filter!(*args, **_arg1_arg1, &block); end - def filter_map(*args, **_arg1_arg1, &block); end - def find(*args, **_arg1_arg1, &block); end - def find_all(*args, **_arg1_arg1, &block); end - def find_index(*args, **_arg1_arg1, &block); end - def first(*args, **_arg1_arg1, &block); end - def flat_map(*args, **_arg1_arg1, &block); end - def flatten(*args, **_arg1_arg1, &block); end - def flatten!(*args, **_arg1_arg1, &block); end - def grep(*args, **_arg1_arg1, &block); end - def grep_v(*args, **_arg1_arg1, &block); end - def group_by(*args, **_arg1_arg1, &block); end - def include?(*args, **_arg1_arg1, &block); end - def index(*args, **_arg1_arg1, &block); end - def inject(*args, **_arg1_arg1, &block); end - def insert(*args, **_arg1_arg1, &block); end - def intersect?(*args, **_arg1_arg1, &block); end - def intersection(*args, **_arg1_arg1, &block); end - def join(*args, **_arg1_arg1, &block); end - def keep_if(*args, **_arg1_arg1, &block); end - def last(*args, **_arg1_arg1, &block); end - def lazy(*args, **_arg1_arg1, &block); end - def length(*args, **_arg1_arg1, &block); end - def map(*args, **_arg1_arg1, &block); end - def map!(*args, **_arg1_arg1, &block); end - def max(*args, **_arg1_arg1, &block); end - def max_by(*args, **_arg1_arg1, &block); end - def member?(*args, **_arg1_arg1, &block); end - def min(*args, **_arg1_arg1, &block); end - def min_by(*args, **_arg1_arg1, &block); end - def minmax(*args, **_arg1_arg1, &block); end - def minmax_by(*args, **_arg1_arg1, &block); end - def none?(*args, **_arg1_arg1, &block); end - def one?(*args, **_arg1_arg1, &block); end - def pack(*args, **_arg1_arg1, &block); end - def partition(*args, **_arg1_arg1, &block); end - def permutation(*args, **_arg1_arg1, &block); end - def place(*args, **_arg1_arg1, &block); end - def pop(*args, **_arg1_arg1, &block); end - def prepend(*args, **_arg1_arg1, &block); end - def product(*args, **_arg1_arg1, &block); end - def push(*args, **_arg1_arg1, &block); end - def rassoc(*args, **_arg1_arg1, &block); end - def reduce(*args, **_arg1_arg1, &block); end - def reject(*args, **_arg1_arg1, &block); end - def reject!(*args, **_arg1_arg1, &block); end - def repeated_combination(*args, **_arg1_arg1, &block); end - def repeated_permutation(*args, **_arg1_arg1, &block); end - def replace(*args, **_arg1_arg1, &block); end - def reverse(*args, **_arg1_arg1, &block); end - def reverse!(*args, **_arg1_arg1, &block); end - def reverse_each(*args, **_arg1_arg1, &block); end - def rindex(*args, **_arg1_arg1, &block); end - def rotate(*args, **_arg1_arg1, &block); end - def rotate!(*args, **_arg1_arg1, &block); end - def sample(*args, **_arg1_arg1, &block); end - def select(*args, **_arg1_arg1, &block); end - def select!(*args, **_arg1_arg1, &block); end - def shelljoin(*args, **_arg1_arg1, &block); end - def shift(*args, **_arg1_arg1, &block); end - def shuffle(*args, **_arg1_arg1, &block); end - def shuffle!(*args, **_arg1_arg1, &block); end - def size(*args, **_arg1_arg1, &block); end - def slice(*args, **_arg1_arg1, &block); end - def slice!(*args, **_arg1_arg1, &block); end - def slice_after(*args, **_arg1_arg1, &block); end - def slice_before(*args, **_arg1_arg1, &block); end - def slice_when(*args, **_arg1_arg1, &block); end - def sort(*args, **_arg1_arg1, &block); end - def sort!(*args, **_arg1_arg1, &block); end - def sort_by(*args, **_arg1_arg1, &block); end - def sort_by!(*args, **_arg1_arg1, &block); end - def sum(*args, **_arg1_arg1, &block); end - def take(*args, **_arg1_arg1, &block); end - def take_while(*args, **_arg1_arg1, &block); end - def tally(*args, **_arg1_arg1, &block); end - def to_ary(*args, **_arg1_arg1, &block); end - def to_h(*args, **_arg1_arg1, &block); end - def to_set(*args, **_arg1_arg1, &block); end - def transpose(*args, **_arg1_arg1, &block); end - def union(*args, **_arg1_arg1, &block); end - def uniq(*args, **_arg1_arg1, &block); end - def uniq!(*args, **_arg1_arg1, &block); end - def unshift(*args, **_arg1_arg1, &block); end - def values_at(*args, **_arg1_arg1, &block); end - def zip(*args, **_arg1_arg1, &block); end - def |(*args, **_arg1_arg1, &block); end -end - -RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -module RuboCop::AST::ConditionalNode - def body; end - def condition; end - def multiline_condition?; end - def single_line_condition?; end -end - -class RuboCop::AST::ConstNode < ::RuboCop::AST::Node - def absolute?; end - def class_name?; end - def each_path(&block); end - def module_name?; end - def namespace; end - def relative?; end - def short_name; end -end - -class RuboCop::AST::DefNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - - def argument_forwarding?; end - def arguments; end - def body; end - def endless?; end - def method_name; end - def receiver; end - def void_context?; end -end - -class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -module RuboCop::AST::Descendence - def child_nodes; end - def descendants; end - def each_child_node(*types); end - def each_descendant(*types, &block); end - def each_node(*types, &block); end - - protected - - def visit_descendants(types, &block); end -end - -class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode - def value; end -end - -class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node - def body; end -end - -module RuboCop::AST::Ext; end - -module RuboCop::AST::Ext::Range - def line_span(exclude_end: T.unsafe(nil)); end -end - -module RuboCop::AST::Ext::RangeMinMax; end - -class RuboCop::AST::FloatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -class RuboCop::AST::ForNode < ::RuboCop::AST::Node - def body; end - def collection; end - def do?; end - def keyword; end - def variable; end - def void_context?; end -end - -class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - def to_a; end -end - -module RuboCop::AST::HashElementNode - def delimiter_delta(other); end - def key; end - def key_delta(other, alignment = T.unsafe(nil)); end - def same_line?(other); end - def value; end - def value_delta(other); end -end - -class RuboCop::AST::HashElementNode::HashElementDelta - def initialize(first, second); end - - def delimiter_delta; end - def key_delta(alignment = T.unsafe(nil)); end - def value_delta; end - - private - - def delta(first, second, alignment = T.unsafe(nil)); end - def first; end - def keyword_splat?; end - def second; end - def valid_argument_types?; end -end - -class RuboCop::AST::HashNode < ::RuboCop::AST::Node - def braces?; end - def each_key(&block); end - def each_pair; end - def each_value(&block); end - def empty?; end - def keys; end - def mixed_delimiters?; end - def pairs; end - def pairs_on_same_line?; end - def values; end -end - -class RuboCop::AST::IfNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def branches; end - def each_branch(&block); end - def else?; end - def else_branch; end - def elsif?; end - def elsif_conditional?; end - def if?; end - def if_branch; end - def inverse_keyword; end - def keyword; end - def modifier_form?; end - def nested_conditional?; end - def node_parts; end - def ternary?; end - def unless?; end -end - -class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def pattern; end - def then?; end -end - -class RuboCop::AST::IndexNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def method_name; end - - private - - def first_argument_index; end -end - -class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def method_name; end - - private - - def first_argument_index; end -end - -class RuboCop::AST::IntNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - def colon?; end - def hash_rocket?; end - def node_parts; end - def operator; end -end - -RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) - -class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def lambda?; end - def lambda_literal?; end - def method_name; end - def receiver; end - - private - - def first_argument_index; end -end - -module RuboCop::AST::MethodDispatchNode - include ::RuboCop::AST::MethodIdentifierPredicates - extend ::RuboCop::AST::NodePattern::Macros - - def access_modifier?; end - def adjacent_def_modifier?(param0 = T.unsafe(nil)); end - def arithmetic_operation?; end - def assignment?; end - def bare_access_modifier?; end - def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - def binary_operation?; end - def block_literal?; end - def block_node; end - def command?(name); end - def const_receiver?; end - def def_modifier(node = T.unsafe(nil)); end - def def_modifier?(node = T.unsafe(nil)); end - def dot?; end - def double_colon?; end - def implicit_call?; end - def in_macro_scope?(param0 = T.unsafe(nil)); end - def lambda?; end - def lambda_literal?; end - def macro?; end - def method_name; end - def non_bare_access_modifier?; end - def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - def receiver; end - def safe_navigation?; end - def self_receiver?; end - def setter_method?; end - def special_modifier?; end - def unary_operation?; end -end - -RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) - -module RuboCop::AST::MethodIdentifierPredicates - def assignment_method?; end - def bang_method?; end - def camel_case_method?; end - def comparison_method?; end - def const_receiver?; end - def enumerable_method?; end - def enumerator_method?; end - def method?(name); end - def negation_method?; end - def nonmutating_array_method?; end - def nonmutating_binary_operator_method?; end - def nonmutating_hash_method?; end - def nonmutating_operator_method?; end - def nonmutating_string_method?; end - def nonmutating_unary_operator_method?; end - def operator_method?; end - def predicate_method?; end - def prefix_bang?; end - def prefix_not?; end - def self_receiver?; end -end - -RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -module RuboCop::AST::ModifierNode - def modifier_form?; end -end - -class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node - def body; end - def identifier; end -end - -class RuboCop::AST::NextNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -class RuboCop::AST::Node < ::Parser::AST::Node - include ::RuboCop::AST::Sexp - include ::RuboCop::AST::Descendence - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - def __ENCODING___type?; end - def __FILE___type?; end - def __LINE___type?; end - def alias_type?; end - def ancestors; end - def and_asgn_type?; end - def and_type?; end - def arg_expr_type?; end - def arg_type?; end - def args_type?; end - def argument?; end - def argument_type?; end - def array_pattern_type?; end - def array_pattern_with_tail_type?; end - def array_type?; end - def assignment?; end - def assignment_or_similar?(param0 = T.unsafe(nil)); end - def back_ref_type?; end - def basic_conditional?; end - def basic_literal?; end - def begin_type?; end - def block_pass_type?; end - def block_type?; end - def blockarg_expr_type?; end - def blockarg_type?; end - def boolean_type?; end - def break_type?; end - def call_type?; end - def case_match_type?; end - def case_type?; end - def casgn_type?; end - def cbase_type?; end - def chained?; end - def class_constructor?(param0 = T.unsafe(nil)); end - def class_definition?(param0 = T.unsafe(nil)); end - def class_type?; end - def complete!; end - def complete?; end - def complex_type?; end - def conditional?; end - def const_name; end - def const_pattern_type?; end - def const_type?; end - def csend_type?; end - def cvar_type?; end - def cvasgn_type?; end - def def_type?; end - def defined_module; end - def defined_module_name; end - def defined_type?; end - def defs_type?; end - def dstr_type?; end - def dsym_type?; end - def each_ancestor(*types, &block); end - def eflipflop_type?; end - def empty_else_type?; end - def empty_source?; end - def ensure_type?; end - def equals_asgn?; end - def erange_type?; end - def false_type?; end - def falsey_literal?; end - def find_pattern_type?; end - def first_line; end - def float_type?; end - def for_type?; end - def forward_arg_type?; end - def forward_args_type?; end - def forwarded_args_type?; end - def global_const?(param0 = T.unsafe(nil), param1); end - def guard_clause?; end - def gvar_type?; end - def gvasgn_type?; end - def hash_pattern_type?; end - def hash_type?; end - def ident_type?; end - def if_guard_type?; end - def if_type?; end - def iflipflop_type?; end - def immutable_literal?; end - def in_match_type?; end - def in_pattern_type?; end - def index_type?; end - def indexasgn_type?; end - def int_type?; end - def irange_type?; end - def ivar_type?; end - def ivasgn_type?; end - def keyword?; end - def kwarg_type?; end - def kwargs_type?; end - def kwbegin_type?; end - def kwnilarg_type?; end - def kwoptarg_type?; end - def kwrestarg_type?; end - def kwsplat_type?; end - def lambda?(param0 = T.unsafe(nil)); end - def lambda_or_proc?(param0 = T.unsafe(nil)); end - def lambda_type?; end - def last_line; end - def left_sibling; end - def left_siblings; end - def line_count; end - def literal?; end - def loop_keyword?; end - def lvar_type?; end - def lvasgn_type?; end - def masgn_type?; end - def match_alt_type?; end - def match_as_type?; end - def match_current_line_type?; end - def match_guard_clause?(param0 = T.unsafe(nil)); end - def match_nil_pattern_type?; end - def match_pattern_p_type?; end - def match_pattern_type?; end - def match_rest_type?; end - def match_var_type?; end - def match_with_lvasgn_type?; end - def match_with_trailing_comma_type?; end - def mlhs_type?; end - def module_definition?(param0 = T.unsafe(nil)); end - def module_type?; end - def multiline?; end - def mutable_literal?; end - def new_class_or_module_block?(param0 = T.unsafe(nil)); end - def next_type?; end - def nil_type?; end - def node_parts; end - def nonempty_line_count; end - def not_type?; end - def nth_ref_type?; end - def numargs_type?; end - def numblock_type?; end - def numeric_type?; end - def objc_kwarg_type?; end - def objc_restarg_type?; end - def objc_varargs_type?; end - def op_asgn_type?; end - def operator_keyword?; end - def optarg_type?; end - def or_asgn_type?; end - def or_type?; end - def pair_type?; end - def parent; end - def parent?; end - def parent_module_name; end - def parenthesized_call?; end - def pin_type?; end - def post_condition_loop?; end - def postexe_type?; end - def preexe_type?; end - def proc?(param0 = T.unsafe(nil)); end - def procarg0_type?; end - def pure?; end - def range_type?; end - def rational_type?; end - def receiver(param0 = T.unsafe(nil)); end - def recursive_basic_literal?; end - def recursive_literal?; end - def redo_type?; end - def reference?; end - def regexp_type?; end - def regopt_type?; end - def resbody_type?; end - def rescue_type?; end - def restarg_expr_type?; end - def restarg_type?; end - def retry_type?; end - def return_type?; end - def right_sibling; end - def right_siblings; end - def root?; end - def sclass_type?; end - def self_type?; end - def send_type?; end - def shadowarg_type?; end - def shorthand_asgn?; end - def sibling_index; end - def single_line?; end - def source; end - def source_length; end - def source_range; end - def special_keyword?; end - def splat_type?; end - def str_content(param0 = T.unsafe(nil)); end - def str_type?; end - def struct_constructor?(param0 = T.unsafe(nil)); end - def super_type?; end - def sym_type?; end - def true_type?; end - def truthy_literal?; end - def undef_type?; end - def unless_guard_type?; end - def until_post_type?; end - def until_type?; end - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - def value_used?; end - def variable?; end - def when_type?; end - def while_post_type?; end - def while_type?; end - def xstr_type?; end - def yield_type?; end - def zsuper_type?; end - - protected - - def parent=(node); end - - private - - def begin_value_used?; end - def case_if_value_used?; end - def defined_module0(param0 = T.unsafe(nil)); end - def for_value_used?; end - def parent_module_name_for_block(ancestor); end - def parent_module_name_for_sclass(sclass_node); end - def parent_module_name_part(node); end - def visit_ancestors(types); end - def while_until_value_used?; end -end - -RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) - -class RuboCop::AST::NodePattern - include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable - - def initialize(str, compiler: T.unsafe(nil)); end - - def ==(other); end - def as_json(_options = T.unsafe(nil)); end - def ast; end - def captures(*args, **_arg1_arg1, &block); end - def encode_with(coder); end - def eql?(other); end - def freeze; end - def init_with(coder); end - def marshal_dump; end - def marshal_load(pattern); end - def match(*args, **rest, &block); end - def match_code; end - def named_parameters(*args, **_arg1_arg1, &block); end - def pattern; end - def positional_parameters(*args, **_arg1_arg1, &block); end - def to_s; end - - class << self - def descend(element, &block); end - end -end - -class RuboCop::AST::NodePattern::Builder - def emit_atom(type, value); end - def emit_call(type, selector, args = T.unsafe(nil)); end - def emit_capture(capture_token, node); end - def emit_list(type, _begin, children, _end); end - def emit_subsequence(node_list); end - def emit_unary_op(type, _operator = T.unsafe(nil), *children); end - def emit_union(begin_t, pattern_lists, end_t); end - - private - - def n(type, *args); end - def optimizable_as_set?(children); end - def union_children(pattern_lists); end -end - -class RuboCop::AST::NodePattern::Comment - def initialize(range); end - - def ==(other); end - def inspect; end - def loc; end - def location; end - def text; end -end - -class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable - - def initialize; end - - def bind(*args, **_arg1_arg1, &block); end - def binding; end - def captures; end - def compile_as_atom(node); end - def compile_as_node_pattern(node, **options); end - def compile_sequence(sequence, var:); end - def each_union(enum, &block); end - def freeze; end - def named_parameter(name); end - def named_parameters; end - def next_capture; end - def parser; end - def positional_parameter(number); end - def positional_parameters; end - def with_temp_variables(*names, &block); end - - private - - def enforce_same_captures(enum); end - def new_capture; end -end - -class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - private - - def visit_const; end - def visit_named_parameter; end - def visit_number; end - def visit_other_type; end - def visit_positional_parameter; end - def visit_regexp; end - def visit_set; end - def visit_string; end - def visit_symbol; end - def visit_unify; end -end - -class RuboCop::AST::NodePattern::Compiler::Binding - def initialize; end - - def bind(name); end - def union_bind(enum); end - - private - - def forbid(names); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler - def initialize; end - - def comments(*args, **_arg1_arg1, &block); end - def named_parameters; end - def node_ids; end - def parser; end - def tokens(*args, **_arg1_arg1, &block); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer - def initialize(pattern, compiler: T.unsafe(nil)); end - - def compiler; end - def node_pattern; end - def pattern; end - def test(ruby, trace: T.unsafe(nil)); end - - private - - def ruby_ast(ruby); end - def ruby_parser; end -end - -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug - -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct - def color_map(color_scheme = T.unsafe(nil)); end - def colorize(color_scheme = T.unsafe(nil)); end - def colorizer; end - def colorizer=(_); end - def match_map; end - def matched?(node); end - def returned; end - def returned=(_); end - def ruby_ast; end - def ruby_ast=(_); end - def trace; end - def trace=(_); end - - private - - def ast; end - def color_map_for(node, color); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler - def do_compile; end - - private - - def node_id; end - def tracer(kind); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -class RuboCop::AST::NodePattern::Compiler::Debug::Trace - def initialize; end - - def enter(node_id); end - def matched?(node_id); end - def success(node_id); end -end - -class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end - - def access; end - def seq_head; end - - private - - def access_element; end - def access_node; end - def compile_args(arg_list, first: T.unsafe(nil)); end - def compile_guard_clause; end - def compile_value_match(value); end - def multiple_access(kind); end - def visit_ascend; end - def visit_capture; end - def visit_descend; end - def visit_function_call; end - def visit_intersection; end - def visit_negation; end - def visit_node_type; end - def visit_other_type; end - def visit_predicate; end - def visit_sequence; end - def visit_unify; end - def visit_union; end - def visit_wildcard; end -end - -class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler, sequence:, var:); end - - def compile_sequence; end - def in_sync; end - - protected - - def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end - def cur_index; end - def sync; end - - private - - def compile_and_advance(term); end - def compile_any_order_branches(matched_var); end - def compile_any_order_else; end - def compile_captured_repetition(child_code, child_captures); end - def compile_case(when_branches, else_code); end - def compile_child_nb_guard(arity_range); end - def compile_cur_index; end - def compile_index(cur = T.unsafe(nil)); end - def compile_loop(term); end - def compile_loop_advance(to = T.unsafe(nil)); end - def compile_matched(kind); end - def compile_max_matched; end - def compile_min_check; end - def compile_remaining; end - def compile_union_forks; end - def empty_loop; end - def handle_prev; end - def merge_forks!(forks); end - def preserve_union_start(forks); end - def remaining_arities(children, last_arity); end - def use_index_from_end; end - def visit_any_order; end - def visit_capture; end - def visit_other_type; end - def visit_repetition; end - def visit_rest; end - def visit_union; end - def within_loop; end -end - -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) - -class RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler); end - - def compile(node); end - def compiler; end - - private - - def do_compile; end - def node; end - - class << self - def inherited(base); end - def method_added(method); end - def registry; end - end -end - -class RuboCop::AST::NodePattern::Invalid < ::StandardError; end - -class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex - def initialize(source); end - - def comments; end - def source_buffer; end - def tokens; end - - private - - def do_parse; end - def emit(type); end - def emit_comment; end - def emit_regexp; end - def token(type, value); end -end - -RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError -RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::LexerRex - def action; end - def filename; end - def filename=(_arg0); end - def location; end - def match; end - def matches; end - def next_token; end - def parse(str); end - def parse_file(path); end - def scanner_class; end - def ss; end - def ss=(_arg0); end - def state; end - def state=(_arg0); end -end - -RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) -class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end -RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) -class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end - -module RuboCop::AST::NodePattern::Macros - def def_node_matcher(method_name, pattern_str, **keyword_defaults); end - def def_node_search(method_name, pattern_str, **keyword_defaults); end -end - -module RuboCop::AST::NodePattern::MethodDefiner - def as_lambda; end - def compile_as_lambda; end - def def_node_matcher(base, method_name, **defaults); end - def def_node_search(base, method_name, **defaults); end - - private - - def compile_init; end - def def_helper(base, method_name, **defaults); end - def emit_keyword_list(forwarding: T.unsafe(nil)); end - def emit_lambda_code; end - def emit_method_code; end - def emit_node_search(method_name); end - def emit_node_search_body(method_name, prelude:, on_match:); end - def emit_param_list; end - def emit_params(*first, forwarding: T.unsafe(nil)); end - def emit_retval; end - def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end - def wrapping_block(method_name, **defaults); end -end - -class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node - include ::RuboCop::AST::Descendence - extend ::Forwardable - - def arity; end - def arity_range; end - def capture?; end - def child; end - def children_nodes; end - def in_sequence_head; end - def matches_within_set?; end - def nb_captures; end - def rest?; end - def variadic?; end - def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def ends_with_rest?; end - def rest_node; end - def term_nodes; end -end - -RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - def arity(*args, **_arg1_arg1, &block); end - def capture?; end - def in_sequence_head; end - def nb_captures; end - def rest?(*args, **_arg1_arg1, &block); end -end - -module RuboCop::AST::NodePattern::Node::ForbidInSeqHead - def in_sequence_head; end -end - -RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate -RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) - -class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - def arg_list; end - def method_name; end -end - -class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def operator; end -end - -RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - def arity; end - def in_sequence_head; end - def rest?; end -end - -RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) - -class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def in_sequence_head; end -end - -class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - def arity; end - def in_sequence_head; end -end - -class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable - - def initialize(builder = T.unsafe(nil)); end - - def _reduce_10(val, _values); end - def _reduce_11(val, _values); end - def _reduce_13(val, _values); end - def _reduce_14(val, _values); end - def _reduce_15(val, _values); end - def _reduce_16(val, _values); end - def _reduce_17(val, _values); end - def _reduce_18(val, _values); end - def _reduce_19(val, _values); end - def _reduce_2(val, _values); end - def _reduce_20(val, _values); end - def _reduce_21(val, _values); end - def _reduce_22(val, _values); end - def _reduce_25(val, _values); end - def _reduce_26(val, _values); end - def _reduce_3(val, _values); end - def _reduce_33(val, _values); end - def _reduce_37(val, _values); end - def _reduce_38(val, _values); end - def _reduce_39(val, _values); end - def _reduce_4(val, _values); end - def _reduce_40(val, _values); end - def _reduce_41(val, _values); end - def _reduce_42(val, _values); end - def _reduce_43(val, _values); end - def _reduce_44(val, _values); end - def _reduce_45(val, _values); end - def _reduce_46(val, _values); end - def _reduce_5(val, _values); end - def _reduce_6(val, _values); end - def _reduce_7(val, _values); end - def _reduce_8(val, _values); end - def _reduce_9(val, _values); end - def _reduce_none(val, _values); end - def emit_atom(*args, **_arg1_arg1, &block); end - def emit_call(*args, **_arg1_arg1, &block); end - def emit_capture(*args, **_arg1_arg1, &block); end - def emit_list(*args, **_arg1_arg1, &block); end - def emit_unary_op(*args, **_arg1_arg1, &block); end - def emit_union(*args, **_arg1_arg1, &block); end - def inspect; end - def next_token(*args, **_arg1_arg1, &block); end - def parse(source); end - - private - - def enforce_unary(node); end - def on_error(token, val, _vstack); end -end - -RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder -RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer -RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser - def comments; end - def do_parse; end - def tokens; end -end - -class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder - def emit_atom(type, token); end - def emit_call(type, selector_t, args = T.unsafe(nil)); end - def emit_list(type, begin_t, children, end_t); end - def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end - - private - - def join_exprs(left_expr, right_expr); end - def loc(token_or_range); end - def n(type, children, source_map); end - def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer - def initialize(str_or_buffer); end - - def emit_comment; end - def pos; end - def source_buffer; end - def token(type, value); end -end - -module RuboCop::AST::NodePattern::Sets - class << self - def [](set); end - def name(set); end - def uniq(name); end - end -end - -RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) -RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CONSTANTIZE_CONSTANTS_CONST_GET = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ENUMERATOR_RATIONAL_COMPLEX_THREAD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TASK_NAMESPACE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___EQL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) - -module RuboCop::AST::NumericNode - def sign?; end -end - -RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node - def assignment_node; end - def expression; end - def name; end - def operator; end -end - -class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode - def operator; end -end - -class RuboCop::AST::OrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - def alternate_operator; end - def inverse_operator; end -end - -class RuboCop::AST::PairNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - def colon?; end - def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - def hash_rocket?; end - def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - def value_omission?; end - def value_on_new_line?; end -end - -RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) - -module RuboCop::AST::ParameterizedNode - def arguments?; end - def block_argument?; end - def first_argument; end - def last_argument; end - def parenthesized?; end - def rest_argument?; end - def splat_argument?; end -end - -module RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::ParameterizedNode - - def arguments; end - def arguments?; end - def first_argument; end - def last_argument; end -end - -module RuboCop::AST::ParameterizedNode::WrappedArguments - include ::RuboCop::AST::ParameterizedNode - - def arguments; end -end - -module RuboCop::AST::PredicateOperatorNode - def logical_operator?; end - def operator; end - def semantic_operator?; end -end - -RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) - -class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode - def name; end -end - -class RuboCop::AST::ProcessedSource - include ::RuboCop::Ext::ProcessedSource - - def initialize(source, ruby_version, path = T.unsafe(nil)); end - - def [](*args); end - def ast; end - def ast_with_comments; end - def blank?; end - def buffer; end - def checksum; end - def comment_at_line(line); end - def commented?(source_range); end - def comments; end - def comments_before_line(line); end - def contains_comment?(source_range); end - def current_line(token); end - def diagnostics; end - def each_comment(&block); end - def each_comment_in_lines(line_range); end - def each_token(&block); end - def file_path; end - def find_comment(&block); end - def find_token(&block); end - def first_token_of(range_or_node); end - def following_line(token); end - def last_token_of(range_or_node); end - def line_indentation(line_number); end - def line_with_comment?(line); end - def lines; end - def parser_error; end - def path; end - def preceding_line(token); end - def raw_source; end - def ruby_version; end - def sorted_tokens; end - def start_with?(string); end - def tokens; end - def tokens_within(range_or_node); end - def valid_syntax?; end - - private - - def comment_index; end - def create_parser(ruby_version); end - def first_token_index(range_or_node); end - def last_token_index(range_or_node); end - def parse(source, ruby_version); end - def parser_class(ruby_version); end - def source_range(range_or_node); end - def tokenize(parser); end - - class << self - def from_file(path, ruby_version); end - end -end - -RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) -RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) - -class RuboCop::AST::RangeNode < ::RuboCop::AST::Node - def begin; end - def end; end -end - -class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - include ::RuboCop::Ext::RegexpNode - - def content; end - def delimiter?(char); end - def delimiters; end - def extended?; end - def ignore_case?; end - def interpolation?; end - def multiline_mode?; end - def no_encoding?; end - def options; end - def percent_r_literal?; end - def regopt; end - def single_interpolation?; end - def slash_literal?; end - def to_regexp; end - - private - - def regopt_include?(option); end -end - -RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def exception_variable; end - def exceptions; end -end - -class RuboCop::AST::RescueNode < ::RuboCop::AST::Node - def body; end - def branches; end - def else?; end - def else_branch; end - def resbody_branches; end -end - -class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -module RuboCop::AST::RuboCopCompatibility - def rubocop_loaded; end -end - -RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node - def body; end - def identifier; end -end - -class RuboCop::AST::SendNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def attribute_accessor?(param0 = T.unsafe(nil)); end - - private - - def first_argument_index; end -end - -module RuboCop::AST::Sexp - def s(type, *children); end -end - -class RuboCop::AST::StrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - - def heredoc?; end -end - -class RuboCop::AST::SuperNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode -end - -class RuboCop::AST::Token - def initialize(pos, type, text); end - - def begin_pos; end - def column; end - def comma?; end - def comment?; end - def end?; end - def end_pos; end - def equal_sign?; end - def left_array_bracket?; end - def left_brace?; end - def left_bracket?; end - def left_curly_brace?; end - def left_parens?; end - def left_ref_bracket?; end - def line; end - def pos; end - def rescue_modifier?; end - def right_bracket?; end - def right_curly_brace?; end - def right_parens?; end - def semicolon?; end - def space_after?; end - def space_before?; end - def text; end - def to_s; end - def type; end - - class << self - def from_parser_token(parser_token); end - end -end - -module RuboCop::AST::Traversal - extend ::RuboCop::AST::Traversal::CallbackCompiler - - def on_(node); end - def on___ENCODING__(node); end - def on___FILE__(node); end - def on___LINE__(node); end - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cbase(node); end - def on_class(node); end - def on_complex(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_false(node); end - def on_find_pattern(node); end - def on_float(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_forward_args(node); end - def on_forwarded_args(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_int(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwnilarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_nil_pattern(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_match_with_trailing_comma(node); end - def on_mlhs(node); end - def on_module(node); end - def on_mrasgn(node); end - def on_next(node); end - def on_nil(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_rasgn(node); end - def on_rational(node); end - def on_redo(node); end - def on_regexp(node); end - def on_regopt(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_self(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_str(node); end - def on_super(node); end - def on_sym(node); end - def on_true(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def on_zsuper(node); end - def walk(node); end -end - -module RuboCop::AST::Traversal::CallbackCompiler - def arity_check(range); end - def body(signature, prelude); end - def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end -end - -RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) -RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) -class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end -RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::UntilNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def do?; end - def inverse_keyword; end - def keyword; end -end - -module RuboCop::AST::Version; end -RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) - -class RuboCop::AST::WhenNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def conditions; end - def each_condition(&block); end - def then?; end -end - -class RuboCop::AST::WhileNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def do?; end - def inverse_keyword; end - def keyword; end -end - -class RuboCop::AST::YieldNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi new file mode 100644 index 00000000..1fa51138 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi b/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi deleted file mode 100644 index eb8910f5..00000000 --- a/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +++ /dev/null @@ -1,118 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-rake` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-rake`. - -module RuboCop; end -module RuboCop::Cop; end -module RuboCop::Cop::Rake; end - -class RuboCop::Cop::Rake::ClassDefinitionInTask < ::RuboCop::Cop::Base - def on_class(node); end - def on_module(node); end -end - -RuboCop::Cop::Rake::ClassDefinitionInTask::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Rake::Desc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnTask - extend ::RuboCop::Cop::AutoCorrector - - def on_task(node); end - def prerequisites(param0 = T.unsafe(nil)); end - - private - - def can_insert_desc_to?(parent); end - def parent_and_task(task_node); end - def task_with_desc?(node); end -end - -RuboCop::Cop::Rake::Desc::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Rake::DuplicateNamespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnNamespace - - def initialize(*_arg0); end - - def message_for_dup(previous:, current:, namespace:); end - def namespaces(node); end - def on_namespace(node); end - def source_location(node); end -end - -RuboCop::Cop::Rake::DuplicateNamespace::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Rake::DuplicateTask < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnTask - - def initialize(*_arg0); end - - def message_for_dup(previous:, current:, task_name:); end - def namespaces(node); end - def on_task(node); end - def source_location(node); end -end - -RuboCop::Cop::Rake::DuplicateTask::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Rake::Helper; end - -module RuboCop::Cop::Rake::Helper::ClassDefinition - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::Cop::Rake::Helper::ClassDefinition - - def class_definition?(param0 = T.unsafe(nil)); end - def in_class_definition?(node); end -end - -module RuboCop::Cop::Rake::Helper::OnNamespace - extend ::RuboCop::AST::NodePattern::Macros - - def namespace?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -module RuboCop::Cop::Rake::Helper::OnTask - extend ::RuboCop::AST::NodePattern::Macros - - def on_send(node); end - def task?(param0 = T.unsafe(nil)); end -end - -module RuboCop::Cop::Rake::Helper::TaskDefinition - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::Cop::Rake::Helper::TaskDefinition - - def in_task_or_namespace?(node); end - def task_or_namespace?(param0 = T.unsafe(nil)); end -end - -module RuboCop::Cop::Rake::Helper::TaskName - extend ::RuboCop::Cop::Rake::Helper::TaskName - - def task_name(node); end -end - -class RuboCop::Cop::Rake::MethodDefinitionInTask < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Rake::MethodDefinitionInTask::MSG = T.let(T.unsafe(nil), String) -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -module RuboCop::Rake; end -RuboCop::Rake::CONFIG = T.let(T.unsafe(nil), Hash) -RuboCop::Rake::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) -class RuboCop::Rake::Error < ::StandardError; end - -module RuboCop::Rake::Inject - class << self - def defaults!; end - end -end - -RuboCop::Rake::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -RuboCop::Rake::VERSION = T.let(T.unsafe(nil), String) -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi b/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi new file mode 100644 index 00000000..2fedfa13 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rake` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rake`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-shopify@2.4.0.rbi b/sorbet/rbi/gems/rubocop-shopify@2.18.0.rbi similarity index 75% rename from sorbet/rbi/gems/rubocop-shopify@2.4.0.rbi rename to sorbet/rbi/gems/rubocop-shopify@2.18.0.rbi index 1ace1160..85953819 100644 --- a/sorbet/rbi/gems/rubocop-shopify@2.4.0.rbi +++ b/sorbet/rbi/gems/rubocop-shopify@2.18.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rubocop-shopify` gem. # Please instead update this file by running `bin/tapioca gem rubocop-shopify`. + # THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi new file mode 100644 index 00000000..9dac839c --- /dev/null +++ b/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.6.5.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.6.5.rbi deleted file mode 100644 index d6731102..00000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.6.5.rbi +++ /dev/null @@ -1,295 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. - -module RuboCop; end -module RuboCop::Cop; end -module RuboCop::Cop::Sorbet; end - -class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop - def allow_incompatible?(param0); end - def allow_incompatible_override?(param0 = T.unsafe(nil)); end - def not_nil?(node); end - def on_send(node); end - def sig?(param0); end -end - -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop - def autocorrect(node); end - def binding_unaliased_type?(param0 = T.unsafe(nil)); end - def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end - def generic_parameter_decl?(param0 = T.unsafe(nil)); end - def method_needing_aliasing_on_t?(param0); end - def not_dynamic_type_creation_with_block?(node); end - def not_generic_parameter_decl?(node); end - def not_nil?(node); end - def not_t_let?(node); end - def on_casgn(node); end - def t_let?(param0 = T.unsafe(nil)); end - def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end - def using_type_alias?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - def autocorrect(node); end - def on_send(node); end -end - -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop - include ::RuboCop::Cop::RangeHelp - - def offending_node(param0); end - def on_signature(node); end -end - -RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - def constant_from_string?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def check_magic_comments_order(tokens); end - def extract_magic_comments(processed_source); end -end - -RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def accessor?(param0 = T.unsafe(nil)); end - def autocorrect(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def on_signature(node); end - def scope(node); end - - private - - def check_node(node); end - def param_type_placeholder; end - def return_type_placeholder; end -end - -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - def initialize(indent, param_placeholder, return_placeholder); end - - def params; end - def params=(_arg0); end - def returns; end - def returns=(_arg0); end - def to_autocorrect; end - - private - - def generate_params; end - def generate_return; end -end - -class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def extract_all_sigils(processed_source); end -end - -class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - def autocorrect(node); end - def extend_t_helpers?(param0 = T.unsafe(nil)); end - def extend_t_sig?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop - def initialize(*_arg0); end - - def autocorrect(node); end - def not_lit_const_include?(param0 = T.unsafe(nil)); end - def on_send(node); end - def used_names; end - def used_names=(_arg0); end -end - -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - def investigate(processed_source); end - - private - - def allowed_paths; end -end - -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop - def not_lit_const_superclass?(param0 = T.unsafe(nil)); end - def on_class(node); end -end - -RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop - def on_send(node); end - def t_unsafe?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop - def on_class(node); end - def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - def t_nilable_untyped(param0 = T.unsafe(nil)); end - def t_struct(param0 = T.unsafe(nil)); end - def t_untyped(param0 = T.unsafe(nil)); end - def untyped_props(param0); end -end - -RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - def require_sigil_on_all_files?; end -end - -class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop - def on_signature(node); end - - private - - def check_order_for_kwoptargs(parameters); end -end - -class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - def abstract?(param0); end - def autocorrect(node); end - def more_than_one_ancestor(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_module(node); end - def requires_ancestors(param0); end - - private - - def new_ra_line(indent_count); end - def process_node(node); end -end - -RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - def autocorrect(node); end - def on_signature(node); end - def root_call(param0); end - - private - - def call_chain(sig_child_node); end - def can_autocorrect?; end - def node_reparsed_with_modern_features(node); end -end - -class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end -RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - def allowed_recv(recv); end - def on_block(node); end - def on_signature(_); end - def signature?(param0 = T.unsafe(nil)); end - def with_runtime?(param0 = T.unsafe(nil)); end - def without_runtime?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop - def autocorrect(node); end - def on_class(node); end - def on_module(node); end - - protected - - def convert_newlines(source); end - def process_node(node); end -end - -RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def check_sigil_present(sigil); end - def check_strictness_level(sigil, strictness); end - def check_strictness_not_empty(sigil, strictness); end - def check_strictness_valid(sigil, strictness); end - def extract_sigil(processed_source); end - def extract_strictness(sigil); end - def minimum_strictness; end - def require_sigil_on_all_files?; end - def suggested_strictness; end - def suggested_strictness_level(minimum_strictness, suggested_strictness); end -end - -RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -module RuboCop::Sorbet; end -RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) -RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) -class RuboCop::Sorbet::Error < ::StandardError; end - -module RuboCop::Sorbet::Inject - class << self - def defaults!; end - end -end - -RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop@1.24.1.rbi b/sorbet/rbi/gems/rubocop@1.24.1.rbi deleted file mode 100644 index ef935dbc..00000000 --- a/sorbet/rbi/gems/rubocop@1.24.1.rbi +++ /dev/null @@ -1,13507 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop` gem. -# Please instead update this file by running `bin/tapioca gem rubocop`. - -module RuboCop; end - -class RuboCop::CLI - def initialize; end - - def config_store; end - def options; end - def run(args = T.unsafe(nil)); end - - private - - def act_on_options; end - def apply_default_formatter; end - def execute_runners; end - def handle_exiting_options; end - def parallel_by_default!; end - def run_command(name); end - def set_options_to_config_loader; end - def suggest_extensions; end - def validate_options_vs_config; end -end - -module RuboCop::CLI::Command - class << self - def run(env, name); end - - private - - def class_for(name); end - end -end - -class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base - def run; end - - private - - def add_formatter; end - def add_inheritance_from_auto_generated_file(config_file); end - def execute_runner; end - def existing_configuration(config_file); end - def line_length_cop(config); end - def line_length_enabled?(config); end - def max_line_length(config); end - def maybe_run_line_length_cop; end - def reset_config_and_auto_gen_file; end - def run_all_cops(line_length_contents); end - def run_line_length_cop; end - def same_max_line_length?(config1, config2); end - def skip_line_length_cop(reason); end - def write_config_file(file_name, file_string, rubocop_yml_contents); end -end - -RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) - -class RuboCop::CLI::Command::Base - def initialize(env); end - - def env; end - - class << self - def by_command_name(name); end - def command_name; end - def command_name=(_arg0); end - def inherited(subclass); end - end -end - -class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base - include ::RuboCop::Formatter::TextUtil - - def run; end - - private - - def display_error_summary(errors); end - def display_summary(runner); end - def display_warning_summary(warnings); end - def execute_runner(paths); end - def maybe_print_corrected_source; end - def with_redirect; end -end - -RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base - def run; end -end - -RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) - -class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base - def initialize(env); end - - def run; end - - private - - def config_lines(cop); end - def cops_of_department(cops, department); end - def print_available_cops; end - def print_cop_details(cops); end - def print_cops_of_department(registry, department, show_all); end - def selected_cops_of_department(cops, department); end -end - -class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base - def initialize(env); end - - def run; end - - private - - def cops_array; end - def print_documentation_url; end - def registry_hash; end -end - -class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base - def run; end - - private - - def current_formatter; end - def dependent_gems; end - def extensions; end - def installed_gems; end - def lockfile; end - def puts(*args); end - def skip?; end -end - -RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base - def run; end -end - -RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Environment - def initialize(options, config_store, paths); end - - def config_store; end - def options; end - def paths; end - def run(name); end -end - -class RuboCop::CLI::Finished < ::RuntimeError; end -RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) - -class RuboCop::CachedData - def initialize(filename); end - - def from_json(text); end - def to_json(offenses); end - - private - - def deserialize_offenses(offenses); end - def message(offense); end - def serialize_offense(offense); end -end - -class RuboCop::CommentConfig - def initialize(processed_source); end - - def comment_only_line?(line_number); end - def cop_disabled_line_ranges; end - def cop_enabled_at_line?(cop, line_number); end - def extra_enabled_comments; end - def processed_source; end - - private - - def analyze; end - def analyze_cop(analysis, directive); end - def analyze_disabled(analysis, directive); end - def analyze_rest(analysis, directive); end - def analyze_single_line(analysis, directive); end - def cop_line_ranges(analysis); end - def each_directive; end - def extra_enabled_comments_with_names(extras:, names:); end - def handle_enable_all(directive, names, extras); end - def handle_switch(directive, names, extras); end - def non_comment_token_line_numbers; end - def qualified_cop_name(cop_name); end -end - -class RuboCop::CommentConfig::CopAnalysis < ::Struct - def line_ranges; end - def line_ranges=(_); end - def start_line_number; end - def start_line_number=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Config - include ::RuboCop::PathUtil - include ::RuboCop::FileFinder - extend ::Forwardable - - def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - - def [](*args, **_arg1_arg1, &block); end - def []=(*args, **_arg1_arg1, &block); end - def add_excludes_from_higher_level(highest_config); end - def allowed_camel_case_file?(file); end - def base_dir_for_path_parameters; end - def bundler_lock_file_path; end - def check; end - def delete(*args, **_arg1_arg1, &block); end - def deprecation_check; end - def dig(*args, **_arg1_arg1, &block); end - def disabled_new_cops?; end - def each(*args, **_arg1_arg1, &block); end - def each_key(*args, **_arg1_arg1, &block); end - def enabled_new_cops?; end - def fetch(*args, **_arg1_arg1, &block); end - def file_to_exclude?(file); end - def file_to_include?(file); end - def for_all_cops; end - def for_badge(badge); end - def for_cop(cop); end - def for_department(department_name); end - def internal?; end - def key?(*args, **_arg1_arg1, &block); end - def keys(*args, **_arg1_arg1, &block); end - def loaded_features; end - def loaded_path; end - def make_excludes_absolute; end - def map(*args, **_arg1_arg1, &block); end - def merge(*args, **_arg1_arg1, &block); end - def path_relative_to_config(path); end - def patterns_to_exclude; end - def patterns_to_include; end - def pending_cops; end - def possibly_include_hidden?; end - def replace(*args, **_arg1_arg1, &block); end - def signature; end - def smart_loaded_path; end - def target_rails_version; end - def target_ruby_version(*args, **_arg1_arg1, &block); end - def to_h(*args, **_arg1_arg1, &block); end - def to_hash(*args, **_arg1_arg1, &block); end - def to_s; end - def transform_values(*args, **_arg1_arg1, &block); end - def validate(*args, **_arg1_arg1, &block); end - def validate_after_resolution; end - - private - - def department_of(qualified_cop_name); end - def enable_cop?(qualified_cop_name, cop_options); end - def read_rails_version_from_bundler_lock_file; end - def target_rails_version_from_bundler_lock_file; end - - class << self - def create(hash, path, check: T.unsafe(nil)); end - end -end - -class RuboCop::Config::CopConfig < ::Struct - def metadata; end - def metadata=(_); end - def name; end - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) - -class RuboCop::ConfigLoader - extend ::RuboCop::FileFinder - - class << self - def add_excludes_from_files(config, config_file); end - def add_loaded_features(loaded_features); end - def add_missing_namespaces(path, hash); end - def clear_options; end - def configuration_file_for(target_dir); end - def configuration_from_file(config_file, check: T.unsafe(nil)); end - def debug; end - def debug=(_arg0); end - def debug?; end - def default_configuration; end - def default_configuration=(_arg0); end - def disable_pending_cops; end - def disable_pending_cops=(_arg0); end - def enable_pending_cops; end - def enable_pending_cops=(_arg0); end - def ignore_parent_exclusion; end - def ignore_parent_exclusion=(_arg0); end - def ignore_parent_exclusion?; end - def load_file(file, check: T.unsafe(nil)); end - def load_yaml_configuration(absolute_path); end - def loaded_features; end - def merge(base_hash, derived_hash); end - def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - def possible_new_cops?(config); end - def project_root; end - def project_root=(_arg0); end - def warn_on_pending_cops(pending_cops); end - def warn_pending_cop(cop); end - - private - - def check_duplication(yaml_code, absolute_path); end - def expand_path(path); end - def file_path(file); end - def find_project_dotfile(target_dir); end - def find_project_root; end - def find_user_dotfile; end - def find_user_xdg_config; end - def read_file(absolute_path); end - def resolver; end - def yaml_safe_load(yaml_code, filename); end - def yaml_safe_load!(yaml_code, filename); end - end -end - -RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) -RuboCop::ConfigLoader::XDG_CONFIG = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigLoaderResolver - def fix_include_paths(base_config_path, hash, path, key, value); end - def merge(base_hash, derived_hash, **opts); end - def merge_with_default(config, config_file, unset_nil:); end - def override_department_setting_for_cops(base_hash, derived_hash); end - def override_enabled_for_disabled_departments(base_hash, derived_hash); end - def resolve_inheritance(path, hash, file, debug); end - def resolve_inheritance_from_gems(hash); end - def resolve_requires(path, hash); end - - private - - def base_configs(path, inherit_from, file); end - def determine_inherit_mode(hash, key); end - def disabled?(hash, department); end - def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - def gem_config_path(gem_name, relative_config_path); end - def handle_disabled_by_default(config, new_default_configuration); end - def inherited_file(path, inherit_from, file); end - def merge_hashes?(base_hash, derived_hash, key); end - def remote_file?(uri); end - def should_merge?(mode, key); end - def should_override?(mode, key); end - def should_union?(derived_hash, base_hash, root_mode, key); end - def transform(config, &block); end - def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end -end - -class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end - -class RuboCop::ConfigObsoletion - def initialize(config); end - - def reject_obsolete!; end - def rules; end - def warnings; end - - private - - def load_cop_rules(rules); end - def load_parameter_rules(rules); end - def load_rules; end - def obsoletions; end - - class << self - def files; end - def files=(_arg0); end - def legacy_cop_names; end - end -end - -RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule - def message; end - def violated?; end - - private - - def value; end -end - -RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule - def message; end -end - -RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule - def initialize(config, old_name); end - - def cop_rule?; end - def message; end - def old_name; end - def violated?; end - def warning?; end -end - -RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, gem); end - - def department; end - def gem; end - def rule_message; end - def violated?; end - - private - - def affected_cops; end - def feature_loaded?; end -end - -RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule - def initialize(config, cop, parameter, metadata); end - - def cop; end - def metadata; end - def parameter; end - def parameter_rule?; end - def violated?; end - def warning?; end - - private - - def alternative; end - def reason; end - def severity; end -end - -class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, metadata); end - - def metadata; end - def old_name; end - def rule_message; end - - private - - def alternatives; end - def reason; end -end - -RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, new_name); end - - def new_name; end - def rule_message; end - - private - - def moved?; end - def verb; end -end - -class RuboCop::ConfigObsoletion::Rule - def initialize(config); end - - def cop_rule?; end - def parameter_rule?; end - def violated?; end - - private - - def config; end - def smart_loaded_path; end - def to_sentence(collection, connector: T.unsafe(nil)); end -end - -class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, metadata); end - - def metadata; end - def rule_message; end - - private - - def alternatives; end -end - -class RuboCop::ConfigRegeneration - def options; end - - private - - def generation_command; end - def todo_exists?; end -end - -RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigStore - def initialize; end - - def for(file_or_dir); end - def for_dir(dir); end - def for_file(file); end - def for_pwd; end - def force_default_config!; end - def options_config=(options_config); end - def unvalidated; end - def validated; end - def validated?; end -end - -class RuboCop::ConfigValidator - extend ::Forwardable - - def initialize(config); end - - def for_all_cops(*args, **_arg1_arg1, &block); end - def smart_loaded_path(*args, **_arg1_arg1, &block); end - def target_ruby_version; end - def validate; end - def validate_after_resolution; end - def validate_section_presence(name); end - - private - - def alert_about_unrecognized_cops(invalid_cop_names); end - def check_cop_config_value(hash, parent = T.unsafe(nil)); end - def check_obsoletions; end - def check_target_ruby; end - def each_invalid_parameter(cop_name); end - def msg_not_boolean(parent, key, value); end - def reject_conflicting_safe_settings; end - def reject_mutually_exclusive_defaults; end - def suggestion(name); end - def target_ruby; end - def validate_enforced_styles(valid_cop_names); end - def validate_new_cops_parameter; end - def validate_parameter_names(valid_cop_names); end - def validate_support_and_has_list(name, formats, valid); end - def validate_syntax_cop; end -end - -RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) -RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) -module RuboCop::Cop; end - -module RuboCop::Cop::Alignment - private - - def check_alignment(items, base_column = T.unsafe(nil)); end - def column_delta; end - def configured_indentation_width; end - def display_column(range); end - def each_bad_alignment(items, base_column); end - def end_of_line_comment(line); end - def indentation(node); end - def offset(node); end - def register_offense(offense_node, message_node); end - def within?(inner, outer); end -end - -RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::AlignmentCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::Alignment - - class << self - def align_end(corrector, processed_source, node, align_to); end - def correct(corrector, processed_source, node, column_delta); end - def processed_source; end - - private - - def alignment_column(align_to); end - def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end - def block_comment_within?(expr); end - def calculate_range(expr, line_begin_pos, column_delta); end - def delimited_string_literal?(node); end - def each_line(expr); end - def inside_string_range(node); end - def inside_string_ranges(node); end - def remove(range, corrector); end - def whitespace_range(node); end - end -end - -module RuboCop::Cop::AllowedIdentifiers - def allowed_identifier?(name); end - def allowed_identifiers; end -end - -RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::AllowedMethods - private - - def allowed_method?(name); end - def allowed_methods; end -end - -class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error - def initialize(name, origin, badges); end -end - -RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::AnnotationComment - extend ::Forwardable - - def initialize(comment, keywords); end - - def annotation?; end - def bounds; end - def colon; end - def comment; end - def correct?(colon:); end - def keyword; end - def margin; end - def note; end - def space; end - - private - - def just_keyword_of_sentence?; end - def keyword_appearance?; end - def keywords; end - def split_comment(comment); end -end - -module RuboCop::Cop::ArrayMinSize - private - - def array_style_detected(style, ary_size); end - def below_array_length?(node); end - def largest_brackets_size(style, ary_size); end - def min_size_config; end - def smallest_percent_size(style, ary_size); end -end - -module RuboCop::Cop::ArraySyntax - private - - def bracketed_array_of?(element_type, node); end -end - -module RuboCop::Cop::AutoCorrector - def support_autocorrect?; end -end - -module RuboCop::Cop::AutocorrectLogic - def autocorrect?; end - def autocorrect_enabled?; end - def autocorrect_requested?; end - def correctable?; end - def disable_uncorrectable?; end - def safe_autocorrect?; end - - private - - def disable_offense(range); end - def disable_offense_at_end_of_line(range, eol_comment); end - def disable_offense_before_and_after(range_by_lines); end - def max_line_length; end - def range_by_lines(range); end - def range_of_first_line(range); end - def surrounding_heredoc(offense_range); end -end - -class RuboCop::Cop::Badge - def initialize(class_name_parts); end - - def ==(other); end - def cop_name; end - def department; end - def eql?(other); end - def hash; end - def match?(other); end - def qualified?; end - def to_s; end - def with_department(department); end - - class << self - def for(class_name); end - def parse(identifier); end - end -end - -class RuboCop::Cop::Base - include ::RuboCop::AST::Sexp - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - include ::RuboCop::Cop::IgnoredNode - include ::RuboCop::Cop::AutocorrectLogic - extend ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end - def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - def callbacks_needed; end - def config; end - def config_to_allow_offenses; end - def config_to_allow_offenses=(hash); end - def cop_config; end - def cop_name; end - def excluded_file?(file); end - def external_dependency_checksum; end - def message(_range = T.unsafe(nil)); end - def name; end - def offenses; end - def on_investigation_end; end - def on_new_investigation; end - def on_other_file; end - def parse(source, path = T.unsafe(nil)); end - def processed_source; end - def ready; end - def relevant_file?(file); end - def target_rails_version; end - def target_ruby_version; end - - private - - def annotate(message); end - def apply_correction(corrector); end - def attempt_correction(range, corrector); end - def begin_investigation(processed_source); end - def callback_argument(range); end - def complete_investigation; end - def correct(range); end - def current_offense_locations; end - def currently_disabled_lines; end - def custom_severity; end - def default_severity; end - def disable_uncorrectable(range); end - def enabled_line?(line_number); end - def file_name_matches_any?(file, parameter, default_result); end - def find_message(range, message); end - def find_severity(_range, severity); end - def range_from_node_or_range(node_or_range); end - def reset_investigation; end - def use_corrector(range, corrector); end - - class << self - def autocorrect_incompatible_with; end - def badge; end - def callbacks_needed; end - def cop_name; end - def department; end - def documentation_url; end - def exclude_from_registry; end - def inherited(subclass); end - def joining_forces; end - def lint?; end - def match?(given_names); end - def support_autocorrect?; end - def support_multiple_source?; end - - private - - def builtin?; end - def restrict_on_send; end - end -end - -class RuboCop::Cop::Base::InvestigationReport < ::Struct - def cop; end - def cop=(_); end - def corrector; end - def corrector=(_); end - def offenses; end - def offenses=(_); end - def processed_source; end - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -module RuboCop::Cop::Bundler; end - -class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def gem_declarations(param0); end - def on_new_investigation; end - - private - - def conditional_declaration?(nodes); end - def duplicated_gem_nodes; end - def register_offense(node, gem_name, line_of_first_occurrence); end - def within_conditional?(node, conditional_node); end -end - -RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DefNode - include ::RuboCop::Cop::GemDeclaration - - def on_send(node); end - - private - - def checked_options_present?(node); end - def commented?(node); end - def commented_any_descendant?(node); end - def contains_checked_options?(node); end - def gem_options(node); end - def ignored_gem?(node); end - def precede?(node1, node2); end - def preceding_comment?(node1, node2); end - def preceding_lines(node); end - def restrictive_version_specified_gem?(node); end - def version_specified_gem?(node); end -end - -RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def expected_gemfile?(basename); end - def gemfile_offense?(basename); end - def gemfile_required?; end - def gems_rb_offense?(basename); end - def gems_rb_required?; end - def register_gemfile_offense(file_path, basename); end - def register_gems_rb_offense(file_path, basename); end - def register_offense(file_path, basename); end -end - -RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemDeclaration - - def includes_commit_reference?(param0 = T.unsafe(nil)); end - def includes_version_specification?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_gem?(node); end - def allowed_gems; end - def forbidden_offense?(node); end - def forbidden_style?; end - def message(range); end - def offense?(node); end - def required_offense?(node); end - def required_style?; end - def version_specification?(expression); end -end - -RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def insecure_protocol_source?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allow_http_protocol?; end -end - -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - def gem_declarations(param0); end - def on_new_investigation; end - - private - - def previous_declaration(node); end -end - -RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::CheckAssignment - def on_and_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - - private - - def extract_rhs(node); end - - class << self - def extract_rhs(node); end - end -end - -module RuboCop::Cop::CheckLineBreakable - def extract_breakable_node(node, max); end - - private - - def all_on_same_line?(nodes); end - def already_on_multiple_lines?(node); end - def breakable_collection?(node, elements); end - def children_could_be_broken_up?(children); end - def contained_by_breakable_collection_on_same_line?(node); end - def contained_by_multiline_collection_that_could_be_broken_up?(node); end - def extract_breakable_node_from_elements(node, elements, max); end - def extract_first_element_over_column_limit(node, elements, max); end - def first_argument_is_heredoc?(node); end - def process_args(args); end - def safe_to_ignore?(node); end - def shift_elements_for_heredoc_arg(node, elements, index); end - def within_column_limit?(element, max, line); end -end - -module RuboCop::Cop::CodeLength - extend ::RuboCop::ExcludeLimit - - def max=(value); end - - private - - def build_code_length_calculator(node); end - def check_code_length(node); end - def count_as_one; end - def count_comments?; end - def irrelevant_line(source_line); end - def max_length; end - def message(length, max_length); end -end - -RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::VisibilityHelp - - def source_range_with_comment(node); end - - private - - def begin_pos_with_comment(node); end - def buffer; end - def end_position_for(node); end - def start_line_position(node); end -end - -class RuboCop::Cop::Commissioner - include ::RuboCop::AST::Traversal - - def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end - - def errors; end - def investigate(processed_source); end - def on___ENCODING__(node); end - def on___FILE__(node); end - def on___LINE__(node); end - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cbase(node); end - def on_class(node); end - def on_complex(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_false(node); end - def on_find_pattern(node); end - def on_float(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_forward_args(node); end - def on_forwarded_args(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_int(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwnilarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_nil_pattern(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_match_with_trailing_comma(node); end - def on_mlhs(node); end - def on_module(node); end - def on_next(node); end - def on_nil(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_rational(node); end - def on_redo(node); end - def on_regexp(node); end - def on_regopt(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_self(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_str(node); end - def on_super(node); end - def on_sym(node); end - def on_true(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def on_zsuper(node); end - - private - - def build_callbacks(cops); end - def initialize_callbacks; end - def invoke(callback, cops, *args); end - def reset; end - def restrict_callbacks(callbacks); end - def restricted_map(callbacks); end - def trigger_responding_cops(callback, node); end - def trigger_restricted_cops(event, node); end - def with_cop_error_handling(cop, node = T.unsafe(nil)); end -end - -class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct - def cop_reports; end - def cop_reports=(_); end - def cops; end - def correctors; end - def errors; end - def errors=(_); end - def merge(investigation); end - def offenses; end - def offenses_per_cop; end - def processed_source; end - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::ConditionCorrector - class << self - def correct_negative_condition(corrector, node); end - - private - - def negated_condition(node); end - end -end - -module RuboCop::Cop::ConfigurableEnforcedStyle - def alternative_style; end - def alternative_styles; end - def ambiguous_style_detected(*possibilities); end - def conflicting_styles_detected; end - def correct_style_detected; end - def detected_style; end - def detected_style=(style); end - def no_acceptable_style!; end - def no_acceptable_style?; end - def opposite_style_detected; end - def style; end - def style_configured?; end - def style_detected(detected); end - def style_parameter_name; end - def supported_styles; end - def unexpected_style_detected(unexpected); end - def unrecognized_style_detected; end -end - -module RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def check_name(node, name, name_range); end - def class_emitter_method?(node, name); end - def report_opposing_styles(node, name); end - def valid_name?(node, name, given_style = T.unsafe(nil)); end -end - -module RuboCop::Cop::ConfigurableMax - private - - def max=(value); end - def max_parameter_name; end -end - -module RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) - -module RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - def corrections; end - def find_location(node, loc); end - def offenses; end - def on_investigation_end; end - def on_new_investigation; end - def support_autocorrect?; end - - private - - def apply_correction(corrector); end - def begin_investigation(processed_source); end - def callback_argument(_range); end - def correction_lambda; end - def dedup_on_node(node); end - def emulate_v0_callsequence(corrector); end - def suppress_clobbering; end - - class << self - def all; end - def joining_forces; end - def qualified_cop_name(name, origin); end - def registry; end - def support_autocorrect?; end - end -end - -class RuboCop::Cop::Cop::Correction < ::Struct - def call(corrector); end - def cop; end - def cop=(_); end - def lambda; end - def lambda=(_); end - def node; end - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter - def initialize(source); end - - def remove_leading(node_or_range, size); end - def remove_preceding(node_or_range, size); end - def remove_trailing(node_or_range, size); end - def rewrite; end - - private - - def check_range_validity(node_or_range); end - def to_range(node_or_range); end - def validate_buffer(buffer); end - - class << self - def source_buffer(source); end - end -end - -RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) - -module RuboCop::Cop::DefNode - extend ::RuboCop::AST::NodePattern::Macros - - def non_public_modifier?(param0 = T.unsafe(nil)); end - - private - - def non_public?(node); end - def preceding_non_public_modifier?(node); end - def stripped_source_upto(index); end -end - -RuboCop::Cop::DefNode::NON_PUBLIC_MODIFIERS = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Documentation - private - - def base_url_for(cop_class, config); end - def default_base_url; end - def department_to_basename(department); end - def url_for(cop_class, config = T.unsafe(nil)); end - - class << self - def base_url_for(cop_class, config); end - def default_base_url; end - def department_to_basename(department); end - def url_for(cop_class, config = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::DocumentationComment - extend ::RuboCop::AST::NodePattern::Macros - - private - - def annotation_keywords; end - def documentation_comment?(node); end - def interpreter_directive_comment?(comment); end - def precede?(node1, node2); end - def preceding_comment?(node1, node2); end - def preceding_lines(node); end - def rubocop_directive_comment?(comment); end -end - -module RuboCop::Cop::Duplication - private - - def consecutive_duplicates(collection); end - def duplicates(collection); end - def duplicates?(collection); end - def grouped_duplicates(collection); end -end - -class RuboCop::Cop::EachToForCorrector - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(block_node); end - - def call(corrector); end - - private - - def argument_node; end - def block_node; end - def collection_node; end - def correction; end - def offending_range; end - def replacement_range(end_pos); end -end - -RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) -RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::EmptyLineCorrector - class << self - def correct(corrector, node); end - def insert_before(corrector, node); end - end -end - -module RuboCop::Cop::EmptyParameter - extend ::RuboCop::AST::NodePattern::Macros - - def empty_arguments?(param0 = T.unsafe(nil)); end - - private - - def check(node); end -end - -module RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - def accept_end_kw_alignment?(end_loc); end - def add_offense_for_misalignment(node, align_with); end - def check_end_kw_alignment(node, align_ranges); end - def check_end_kw_in_node(node); end - def line_break_before_keyword?(whole_expression, rhs); end - def matching_ranges(end_loc, align_ranges); end - def start_line_range(node); end - def style_parameter_name; end - def variable_alignment?(whole_expression, rhs, end_alignment_style); end -end - -RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::EnforceSuperclass - def on_class(node); end - def on_send(node); end - - class << self - def included(base); end - end -end - -module RuboCop::Cop::FirstElementLineBreak - private - - def check_children_line_break(node, children, start = T.unsafe(nil)); end - def check_method_line_break(node, children); end - def first_by_line(nodes); end - def last_by_line(nodes); end - def method_uses_parens?(node, limit); end -end - -class RuboCop::Cop::ForToEachCorrector - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(for_node); end - - def call(corrector); end - - private - - def collection_end; end - def collection_node; end - def collection_source; end - def correction; end - def end_position; end - def for_node; end - def keyword_begin; end - def offending_range; end - def replacement_range(end_pos); end - def requires_parentheses?; end - def variable_node; end -end - -RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Force - def initialize(cops); end - - def cops; end - def investigate(_processed_source); end - def name; end - def run_hook(method_name, *args); end - - class << self - def all; end - def force_name; end - def inherited(subclass); end - end -end - -module RuboCop::Cop::FrozenStringLiteral - private - - def frozen_heredoc?(node); end - def frozen_string_literal?(node); end - def frozen_string_literal_comment_exists?; end - def frozen_string_literal_specified?; end - def frozen_string_literals_disabled?; end - def frozen_string_literals_enabled?; end - def leading_comment_lines; end - def uninterpolated_string?(node); end - - class << self - def frozen_string_literal_comment_exists?; end - end -end - -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::GemDeclaration - extend ::RuboCop::AST::NodePattern::Macros - - def gem_declaration?(param0 = T.unsafe(nil)); end -end - -module RuboCop::Cop::Gemspec; end - -class RuboCop::Cop::Gemspec::DateAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::GemspecHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(block_node); end -end - -RuboCop::Cop::Gemspec::DateAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::GemspecHelp - - def assignment_method_declarations(param0); end - def on_new_investigation; end - - private - - def assignment_method?(method_name); end - def duplicated_assignment_method_nodes; end - def match_block_variable_name?(receiver_name); end - def register_offense(node, assignment, line_of_first_occurrence); end -end - -RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - def dependency_declarations(param0); end - def on_new_investigation; end - - private - - def get_dependency_name(node); end - def previous_declaration(node); end -end - -RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - extend ::RuboCop::Cop::AutoCorrector - - def metadata(param0 = T.unsafe(nil)); end - def on_block(node); end - def rubygems_mfa_required(param0); end - def true_string?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node, block_var, metadata); end - def change_value(corrector, value); end - def correct_metadata(corrector, metadata); end - def insert_mfa_required(corrector, node, block_var); end - def mfa_value(metadata_value); end -end - -RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def defined_ruby_version(param0 = T.unsafe(nil)); end - def on_new_investigation; end - def on_send(node); end - def required_ruby_version?(param0); end - - private - - def dynamic_version?(node); end - def extract_ruby_version(required_ruby_version); end - def not_equal_message(required_ruby_version, target_ruby_version); end -end - -RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - - def on_const(node); end - def ruby_version?(param0 = T.unsafe(nil)); end - - private - - def gem_spec_with_ruby_version?(node); end -end - -RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::GemspecHelp - extend ::RuboCop::AST::NodePattern::Macros - - def gem_specification(param0); end - def gem_specification?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Generator - def initialize(name, output: T.unsafe(nil)); end - - def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end - def inject_require(root_file_path: T.unsafe(nil)); end - def todo; end - def write_source; end - def write_spec; end - - private - - def badge; end - def generate(template); end - def generated_source; end - def generated_spec; end - def output; end - def snake_case(camel_case_string); end - def source_path; end - def spec_path; end - def write_unless_file_exists(path, contents); end -end - -RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Generator::ConfigurationInjector - def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end - - def inject; end - - private - - def badge; end - def configuration_entries; end - def configuration_file_path; end - def cop_name_line?(yaml); end - def find_target_line; end - def new_configuration_entry; end - def output; end - def version_added; end -end - -RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Generator::RequireFileInjector - def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end - - def inject; end - - private - - def injectable_require_directive; end - def output; end - def require_entries; end - def require_exists?; end - def require_path; end - def require_path_fragments(require_directove); end - def root_file_path; end - def source_path; end - def target_line; end - def updated_directives; end -end - -RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) -module RuboCop::Cop::HashAlignmentStyles; end - -class RuboCop::Cop::HashAlignmentStyles::KeyAlignment - def checkable_layout?(_node); end - def deltas(first_pair, current_pair); end - def deltas_for_first_pair(first_pair, _node); end - - private - - def separator_delta(pair); end - def value_delta(pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment - def deltas(first_pair, current_pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - def deltas_for_first_pair(*_nodes); end - - private - - def hash_rocket_delta(first_pair, current_pair); end - def key_delta(first_pair, current_pair); end - def value_delta(first_pair, current_pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::TableAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - def initialize; end - - def deltas_for_first_pair(first_pair, node); end - - private - - def hash_rocket_delta(first_pair, current_pair); end - def key_delta(first_pair, current_pair); end - def max_key_width; end - def max_key_width=(_arg0); end - def value_delta(first_pair, current_pair); end -end - -module RuboCop::Cop::HashAlignmentStyles::ValueAlignment - def checkable_layout?(node); end - def deltas(first_pair, current_pair); end - - private - - def separator_delta(first_pair, current_pair, key_delta); end -end - -module RuboCop::Cop::HashShorthandSyntax - def on_pair(node); end - - private - - def enforced_shorthand_syntax; end - def require_hash_value?(hash_key_source, node); end - def without_parentheses_call_expr_follows?(node); end -end - -RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::HashTransformMethod - extend ::RuboCop::AST::NodePattern::Macros - - def array_receiver?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_csend(node); end - def on_send(node); end - - private - - def execute_correction(corrector, node, correction); end - def extract_captures(_match); end - def handle_possible_offense(node, match, match_desc); end - def new_method_name; end - def on_bad_each_with_object(_node); end - def on_bad_hash_brackets_map(_node); end - def on_bad_map_to_h(_node); end - def on_bad_to_h(_node); end - def prepare_correction(node); end -end - -class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct - def block_node; end - def block_node=(_); end - def leading; end - def leading=(_); end - def match; end - def match=(_); end - def set_new_arg_name(transformed_argname, corrector); end - def set_new_body_expression(transforming_body_expr, corrector); end - def set_new_method_name(new_method_name, corrector); end - def strip_prefix_and_suffix(node, corrector); end - def trailing; end - def trailing=(_); end - - class << self - def [](*_arg0); end - def from_each_with_object(node, match); end - def from_hash_brackets_map(node, match); end - def from_map_to_h(node, match); end - def from_to_h(node, match); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::HashTransformMethod::Captures < ::Struct - def noop_transformation?; end - def transformation_uses_both_args?; end - def transformed_argname; end - def transformed_argname=(_); end - def transforming_body_expr; end - def transforming_body_expr=(_); end - def unchanged_body_expr; end - def unchanged_body_expr=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Heredoc - def on_dstr(node); end - def on_heredoc(_node); end - def on_str(node); end - def on_xstr(node); end - - private - - def delimiter_string(node); end - def heredoc_type(node); end - def indent_level(str); end -end - -RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::IfThenCorrector - def initialize(if_node, indentation: T.unsafe(nil)); end - - def call(corrector); end - - private - - def branch_body_indentation; end - def if_node; end - def indentation; end - def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end - def rewrite_else_branch(else_branch, indentation); end -end - -RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) - -module RuboCop::Cop::IgnoredMethods - mixes_in_class_methods ::RuboCop::Cop::IgnoredMethods::Config - - def ignored_method?(name); end - def ignored_methods; end - - private - - def deprecated_key; end - - class << self - def included(base); end - end -end - -module RuboCop::Cop::IgnoredMethods::Config - def deprecated_key; end - def deprecated_key=(_arg0); end - def ignored_methods(**config); end -end - -module RuboCop::Cop::IgnoredNode - def ignore_node(node); end - def ignored_node?(node); end - def part_of_ignored_node?(node); end - - private - - def ignored_nodes; end -end - -module RuboCop::Cop::IgnoredPattern - private - - def ignored_line?(line); end - def ignored_patterns; end - def matches_ignored_pattern?(line); end -end - -module RuboCop::Cop::IntegerNode - private - - def integer_part(node); end -end - -module RuboCop::Cop::Interpolation - def on_dstr(node); end - def on_dsym(node); end - def on_node_with_interpolations(node); end - def on_regexp(node); end - def on_xstr(node); end -end - -class RuboCop::Cop::LambdaLiteralToMethodCorrector - def initialize(block_node); end - - def call(corrector); end - - private - - def arg_to_unparenthesized_call?; end - def arguments; end - def arguments_begin_pos; end - def arguments_end_pos; end - def block_begin; end - def block_end; end - def block_node; end - def insert_arguments(corrector); end - def insert_separating_space(corrector); end - def lambda_arg_string; end - def method; end - def needs_separating_space?; end - def remove_arguments(corrector); end - def remove_leading_whitespace(corrector); end - def remove_trailing_whitespace(corrector); end - def remove_unparenthesized_whitespace(corrector); end - def replace_delimiters(corrector); end - def replace_selector(corrector); end - def selector_end; end - def separating_space?; end -end - -module RuboCop::Cop::Layout; end - -class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - - private - - def autocorrect(corrector, node); end - def check_body(body, node); end - def check_modifier(send_node, end_range); end - def expected_indent_offset; end - def message(range); end - def unexpected_indent_offset; end -end - -RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def base_column(node, first_argument); end - def fixed_indentation?; end - def message(_node); end - def multiple_arguments?(node, first_argument); end - def target_method_lineno(node); end -end - -RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def autocorrect(corrector, node); end - def base_column(node, args); end - def fixed_indentation?; end - def message(_range); end - def target_method_lineno(node); end -end - -RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - private - - def autocorrect(corrector, node); end - def check_assignment(node, rhs); end - def leftmost_multiple_assignment(node); end -end - -RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_kwbegin(node); end - - private - - def alignment_node(node); end - def autocorrect(corrector, node); end - def check_begin_alignment(node); end -end - -RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_end_align_target?(param0 = T.unsafe(nil), param1); end - def on_block(node); end - def style_parameter_name; end - - private - - def add_space_before(corrector, loc, delta); end - def alt_start_msg(start_loc, source_line_column); end - def autocorrect(corrector, node); end - def block_end_align_target(node); end - def check_block_alignment(start_node, block_node); end - def compute_do_source_line_column(node, end_loc); end - def compute_start_col(ancestor_node, node); end - def disqualified_parent?(parent, node); end - def end_align_target?(node, parent); end - def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - def format_source_line_column(source_line_column); end - def loc_to_source_line_column(loc); end - def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - def remove_space_before(corrector, end_pos, delta); end - def start_for_block_node(block_node); end -end - -RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def delimiter_range(node); end - def message(node); end -end - -RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(case_node); end - def on_case_match(case_match_node); end - - private - - def base_column(case_node, base); end - def check_when(when_node, branch_type); end - def detect_incorrect_style(when_node); end - def incorrect_style(when_node, branch_type); end - def indent_one_step?; end - def indentation_width; end - def replacement(node); end - def whitespace_range(node); end -end - -RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - def dynamic_constant?(param0 = T.unsafe(nil)); end - def on_class(class_node); end - - private - - def autocorrect(corrector, node); end - def begin_pos_with_comment(node); end - def buffer; end - def categories; end - def class_elements(class_node); end - def classify(node); end - def end_position_for(node); end - def expected_order; end - def find_category(node); end - def find_heredoc(node); end - def humanize_node(node); end - def ignore?(classification); end - def ignore_for_autocorrect?(node, sibling); end - def source_range_with_comment(node); end - def start_line_position(node); end - def walk_over_nested_class_definition(class_node); end - def whole_line_comment_at_line?(line); end -end - -RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def argument_indentation_correct?(node); end - def closing_indentation(node); end - def find_node_used_heredoc_argument(node); end - def heredoc_closing(node); end - def heredoc_opening(node); end - def indent_level(source_line); end - def indented_end(node); end - def message(node); end - def opening_indentation(node); end -end - -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_csend(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def all_elements_aligned?(elements); end - def autocorrect(corrector, node); end - def check(node, elements); end - def check_for_elements(node, elements); end - def check_for_no_elements(node); end - def correct_column_candidates(node, left_paren); end - def expected_column(left_paren, elements); end - def first_argument_line(elements); end - def indentation_width; end - def line_break_after_left_paren?(left_paren, elements); end - def message(correct_column, left_paren, right_paren); end -end - -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, comment); end - def autocorrect_one(corrector, comment); end - def autocorrect_preceding_comments(corrector, comment); end - def check(comment, comment_index); end - def correct_indentation(next_line); end - def correctly_aligned_with_preceding_comment?(comment_index, column); end - def less_indented?(line); end - def line_after_comment(comment); end - def message(column, correct_comment_indentation); end - def own_line_comment?(comment); end - def should_correct?(preceding_comment, reference_comment); end - def two_alternatives?(line); end -end - -RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def check(node); end - def message(condition); end -end - -RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def ampersand_dot?(node); end - def autocorrect(corrector, dot, node); end - def correct_dot_position_style?(dot_line, selector_line); end - def end_range(node); end - def heredoc?(node); end - def last_heredoc_line(node); end - def line_between?(first_line, second_line); end - def message(dot); end - def proper_dot_position?(node); end - def receiver_end_line(node); end - def selector_range(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_case_match(node); end - def on_if(node, base = T.unsafe(nil)); end - def on_rescue(node); end - - private - - def assignment_node(node); end - def autocorrect(corrector, node); end - def base_for_method_definition(node); end - def base_range_of_if(node, base); end - def base_range_of_rescue(node); end - def check_alignment(base_range, else_range); end - def check_assignment(node, rhs); end - def check_nested(node, base); end -end - -RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allow_border_comment?; end - def allow_margin_comment?; end - def autocorrect(corrector, node); end - def comment_text(comment); end - def concat_consecutive_comments(comments); end - def current_token(comment); end - def empty_comment_only?(comment_text); end - def investigate(comments); end - def previous_token(node); end -end - -RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def contains_guard_clause?(node); end - def correct_style?(node); end - def heredoc?(node); end - def heredoc_line(node, heredoc_node); end - def last_heredoc_argument(node); end - def last_heredoc_argument_node(node); end - def multiple_statements_on_line?(node); end - def next_line_empty?(line); end - def next_line_empty_or_enable_directive_comment?(line); end - def next_line_enable_directive_comment?(line); end - def next_line_rescue_or_ensure?(node); end - def next_sibling_empty_or_guard_clause?(node); end - def next_sibling_parent_empty_or_else?(node); end - def offense_location(node); end -end - -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def last_magic_comment(source); end - def offending_range(last_magic_comment); end -end - -RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_if(node); end - def on_rescue(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def autocorrect(node); end - def check_condition(condition); end - def multiline_rescue_exceptions?(exception_nodes); end - def multiline_when_condition?(when_node); end - def next_line_empty?(line); end -end - -RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, prev_def, node, count); end - def check_defs(nodes); end - def on_begin(node); end - - private - - def allowance_range?; end - def autocorrect_insert_lines(corrector, newline_pos, count); end - def autocorrect_remove_lines(corrector, newline_pos, count); end - def blank_lines_count_between(first_def_node, second_def_node); end - def candidate?(node); end - def class_candidate?(node); end - def def_end(node); end - def def_start(node); end - def end_loc(node); end - def expected_lines; end - def line_count_allowed?(count); end - def lines_between_defs(first_def_node, second_def_node); end - def maximum_empty_lines; end - def message(node, count: T.unsafe(nil)); end - def method_candidate?(node); end - def minimum_empty_lines; end - def module_candidate?(node); end - def multiple_blank_lines_groups?(first_def_node, second_def_node); end - def node_type(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def each_extra_empty_line(lines); end - def exceeds_line_offset?(line_diff); end - def previous_and_current_lines_empty?(line); end -end - -RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - def on_send(node); end - - private - - def allowed_only_before_style?(node); end - def block_start?(line); end - def body_end?(line); end - def class_def?(line); end - def correct_next_line_if_denied_style(corrector, node, line); end - def empty_lines_around?(node); end - def expected_empty_lines?(node); end - def message(node); end - def message_for_around_style(node); end - def message_for_only_before_style(node); end - def next_empty_line_range(node); end - def next_line_empty?(last_send_line); end - def previous_line_empty?(send_line); end - def previous_line_ignoring_comments(processed_source, send_line); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def empty_lines(node); end - def extra_lines(node); end - def inner_lines(node); end - def line_numbers(node); end - def outer_lines(node); end - def processed_lines(node); end - def receiver_and_method_call_on_different_lines?(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def allow_alias?(node); end - def allow_alias_syntax?; end - def attribute_or_allowed_method?(node); end - def next_line_empty?(line); end - def next_line_node(node); end - def require_empty_line?(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_kwbegin(node); end - - private - - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Layout::EmptyLinesAroundBody - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - def constant_definition?(param0 = T.unsafe(nil)); end - def empty_line_required?(param0 = T.unsafe(nil)); end - - private - - def check(node, body, adjusted_first_line: T.unsafe(nil)); end - def check_beginning(style, first_line); end - def check_both(style, first_line, last_line); end - def check_deferred_empty_line(body); end - def check_empty_lines_except_namespace(body, first_line, last_line); end - def check_empty_lines_special(body, first_line, last_line); end - def check_ending(style, last_line); end - def check_line(style, line, msg); end - def check_source(style, line_no, desc); end - def deferred_message(node); end - def first_child_requires_empty_line?(body); end - def first_empty_line_required_child(body); end - def message(type, desc); end - def namespace?(body, with_one_child: T.unsafe(nil)); end - def previous_line_ignoring_comments(send_line); end - def valid_body_style?(body); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_sclass(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def on_kwbegin(node); end - - private - - def check_body(body, line_of_def_or_kwbegin); end - def keyword_locations(node); end - def keyword_locations_in_ensure(node); end - def keyword_locations_in_rescue(node); end - def message(location, keyword); end - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_module(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_class(node); end - def on_if(node); end - def on_module(node); end - def on_until(node); end - def on_while(node); end - - private - - def alignment_node(node); end - def alignment_node_for_variable_style(node); end - def asgn_variable_align_with(outer_node, inner_node); end - def assignment_or_operator_method(node); end - def autocorrect(corrector, node); end - def check_asgn_alignment(outer_node, inner_node); end - def check_assignment(node, rhs); end - def check_other_alignment(node); end -end - -class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - def offense_message(line); end - def on_new_investigation; end - def unimportant_missing_cr?(index, last_line, line); end - - private - - def last_line(processed_source); end -end - -RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def align_column(asgn_token); end - def align_equal_sign(corrector, token, align_to); end - def align_equal_signs(range, corrector); end - def aligned_locations(locs); end - def aligned_tok?(token); end - def all_relevant_assignment_lines(line_number); end - def allow_for_trailing_comments?; end - def check_assignment(token); end - def check_other(token1, token2, ast); end - def check_tokens(ast, token1, token2); end - def extra_space_range(token1, token2); end - def force_equal_sign_alignment?; end - def ignored_range?(ast, start_pos); end - def ignored_ranges(ast); end -end - -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def eligible_method_call?(param0 = T.unsafe(nil)); end - def on_csend(node); end - def on_send(node); end - - private - - def argument_alignment_config; end - def autocorrect(corrector, node); end - def bare_operator?(node); end - def base_indentation(node); end - def base_range(send_node, arg_node); end - def column_of(range); end - def comment_lines; end - def enforce_first_argument_with_fixed_indentation?; end - def message(arg_node); end - def on_new_investigation; end - def previous_code_line(line_number); end - def special_inner_call_indentation?(node); end -end - -RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_csend(node); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def base_description(left_parenthesis); end - def brace_alignment_style; end - def check(array_node, left_parenthesis); end - def check_right_bracket(right_bracket, left_bracket, left_parenthesis); end - def message(base_description); end - def msg(left_parenthesis); end -end - -RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def assignment_on_same_line?(node); end -end - -RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_hash(node); end - def on_send(node); end - - private - - def argument_alignment_config; end - def autocorrect(corrector, node); end - def base_description(left_parenthesis); end - def brace_alignment_style; end - def check(hash_node, left_parenthesis); end - def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end - def check_right_brace(right_brace, left_brace, left_parenthesis); end - def enforce_first_argument_with_fixed_indentation?; end - def message(base_description); end - def message_for_right_brace(left_parenthesis); end - def separator_style?(first_pair); end -end - -RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - def on_super(node); end -end - -RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def autocorrect(corrector, node); end - def base_description(_); end - def brace_alignment_style; end - def check(def_node); end - def message(base_description); end -end - -RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashAlignmentStyles - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def column_deltas; end - def column_deltas=(_arg0); end - def offenses_by; end - def offenses_by=(_arg0); end - def on_hash(node); end - def on_send(node); end - def on_super(node); end - def on_yield(node); end - - private - - def add_offenses; end - def adjust(corrector, delta, range); end - def alignment_for(pair); end - def alignment_for_colons; end - def alignment_for_hash_rockets; end - def argument_alignment_config; end - def autocorrect_incompatible_with_other_cops?(node); end - def check_delta(delta, node:, alignment:); end - def check_pairs(node); end - def correct_key_value(corrector, delta, key, value, separator); end - def correct_no_value(corrector, key_delta, key); end - def correct_node(corrector, node, delta); end - def double_splat?(node); end - def enforce_first_argument_with_fixed_indentation?; end - def good_alignment?(column_deltas); end - def ignore_hash_argument?(node); end - def new_alignment(key); end - def register_offenses_with_format(offenses, format); end - def reset!; end -end - -RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def add_correct_closing_paren(node, corrector); end - def add_correct_external_trailing_comma(node, corrector); end - def autocorrect(corrector, node); end - def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end - def external_trailing_comma?(node); end - def external_trailing_comma_offset_from_loc_end(node); end - def extract_heredoc(node); end - def extract_heredoc_argument(node); end - def find_most_bottom_of_heredoc_end(arguments); end - def fix_closing_parenthesis(node, corrector); end - def fix_external_trailing_comma(node, corrector); end - def heredoc_node?(node); end - def incorrect_parenthesis_removal_begin(node); end - def incorrect_parenthesis_removal_end(node); end - def internal_trailing_comma?(node); end - def internal_trailing_comma_offset_from_last_arg(node); end - def outermost_send_on_same_line(heredoc); end - def remove_incorrect_closing_paren(node, corrector); end - def remove_incorrect_external_trailing_comma(node, corrector); end - def remove_internal_trailing_comma(node, corrector); end - def safe_to_remove_line_containing_closing_paren?(node); end - def send_missing_closing_parens?(parent, child, heredoc); end - def single_line_send_with_heredoc_receiver?(node); end - def space?(pos); end - def subsequent_closing_parentheses_in_same_line?(outermost_send); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def adjust_minus(corrector, node); end - def adjust_squiggly(corrector, node); end - def base_indent_level(node); end - def heredoc_body(node); end - def heredoc_end(node); end - def heredoc_indent_type(node); end - def indentation_width; end - def indented_body(node); end - def indented_end(node); end - def line_too_long?(node); end - def longest_line(lines); end - def max_line_length; end - def message(heredoc_indent_type); end - def register_offense(node, heredoc_indent_type); end - def type_message(indentation_width, current_indent_type); end - def unlimited_heredoc_length?; end - def width_message(indentation_width); end -end - -RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_kwbegin(node); end - - private - - def autocorrect(corrector, node); end - def bare_access_modifier?(node); end - def base_column_for_normal_style(node); end - def check(node); end - def check_indented_internal_methods_style(node); end - def check_normal_style(node); end -end - -RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, range); end - def autocorrect_lambda_for_spaces(corrector, range); end - def autocorrect_lambda_for_tabs(corrector, range); end - def find_offense(line, lineno); end - def in_string_literal?(ranges, tabs_range); end - def message(_node); end - def string_literal_ranges(ast); end -end - -RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::IgnoredPattern - extend ::RuboCop::Cop::AutoCorrector - - def access_modifier?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_case(case_node); end - def on_case_match(case_match); end - def on_class(node); end - def on_csend(node); end - def on_def(node); end - def on_defs(node); end - def on_ensure(node); end - def on_for(node); end - def on_if(node, base = T.unsafe(nil)); end - def on_kwbegin(node); end - def on_module(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_sclass(node); end - def on_send(node); end - def on_until(node, base = T.unsafe(nil)); end - def on_while(node, base = T.unsafe(nil)); end - - private - - def access_modifier_indentation_style; end - def autocorrect(corrector, node); end - def check_assignment(node, rhs); end - def check_if(node, body, else_clause, base_loc); end - def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - def check_members(base, members); end - def check_members_for_indented_internal_methods_style(members); end - def check_members_for_normal_style(base, members); end - def check_rescue?(rescue_node); end - def configured_indentation_width; end - def each_member(members); end - def indentation_consistency_style; end - def indentation_to_check?(base_loc, body_node); end - def indented_internal_methods_style?; end - def leftmost_modifier_of(node); end - def message(configured_indentation_width, indentation, name); end - def offending_range(body_node, indentation); end - def offense(body_node, indentation, style); end - def other_offense_in_same_range?(node); end - def select_check_member(member); end - def skip_check?(base_loc, body_node); end - def special_modifier?(node); end - def starts_with_access_modifier?(body_node); end -end - -RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def first_token; end - def space_before(token); end -end - -RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allow_doxygen_comment?; end - def allow_gemfile_ruby_comment?; end - def allowed_on_first_line?(comment); end - def doxygen_comment_style?(comment); end - def gemfile?; end - def gemfile_ruby_comment?(comment); end - def hash_mark(expr); end - def rackup_config_file?; end - def rackup_options?(comment); end - def ruby_comment_in_gemfile?(comment); end - def shebang?(comment); end -end - -RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def on_dstr(node); end - - private - - def add_offense_and_correction(node, message); end - def always_indented?(dstr_node); end - def base_column(child); end - def check_aligned(children, start_index); end - def check_indented(children); end - def strings_concatenated_with_backslash?(dstr_node); end -end - -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckLineBreakable - include ::RuboCop::Cop::IgnoredPattern - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::LineLengthHelp - extend ::RuboCop::Cop::AutoCorrector - - def max=(value); end - def on_array(node); end - def on_block(node); end - def on_hash(node); end - def on_investigation_end; end - def on_new_investigation; end - def on_potential_breakable_node(node); end - def on_send(node); end - - private - - def allow_heredoc?; end - def allowed_heredoc; end - def breakable_block_range(block_node); end - def breakable_range; end - def breakable_range=(_arg0); end - def breakable_range_after_semicolon(semicolon_token); end - def breakable_range_by_line_index; end - def check_directive_line(line, line_index); end - def check_for_breakable_block(block_node); end - def check_for_breakable_node(node); end - def check_for_breakable_semicolons(processed_source); end - def check_line(line, line_index); end - def check_uri_line(line, line_index); end - def excess_range(uri_range, line, line_index); end - def extract_heredocs(ast); end - def heredocs; end - def highlight_start(line); end - def ignored_line?(line, line_index); end - def line_in_heredoc?(line_number); end - def line_in_permitted_heredoc?(line_number); end - def max; end - def register_offense(loc, line, line_index, length: T.unsafe(nil)); end - def shebang?(line, line_index); end -end - -RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def check_assignment(node, rhs); end - def check_by_enforced_style(node, rhs); end - def check_new_line_offense(node, rhs); end - def check_same_line_offense(node, rhs); end - - private - - def supported_types; end -end - -RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def add_offense_for_expression(node, expr, msg); end - def args_on_beginning_line?(node); end - def autocorrect(corrector, node); end - def autocorrect_arguments(corrector, node); end - def autocorrect_body(corrector, node, block_body); end - def block_arg_string(node, args); end - def characters_needed_for_space_and_pipes(node); end - def include_trailing_comma?(args); end - def line_break_necessary_in_args?(node); end - def needed_length_for_args(node); end -end - -RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) - -class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def starts_with_curly_brace?(node); end -end - -RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def children(node); end - def ignored_literal?(node); end - def single_line_ignoring_receiver?(node); end -end - -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - def validate_config; end - - private - - def align_with_base_message(rhs); end - def alignment_base(node, rhs, given_style); end - def autocorrect(corrector, node); end - def base_source; end - def extra_indentation(given_style, parent); end - def message(node, lhs, rhs); end - def no_base_message(lhs, rhs, node); end - def offending_range(node, lhs, rhs, given_style); end - def operation_rhs(node); end - def operator_rhs?(node, receiver); end - def receiver_alignment_base(node); end - def relative_to_receiver_message(rhs); end - def relevant_node?(send_node); end - def right_hand_side(send_node); end - def semantic_alignment_base(node, rhs); end - def semantic_alignment_node(node); end - def should_align_with_base?; end - def should_indent_relative_to_receiver?; end - def syntactic_alignment_base(lhs, rhs); end -end - -class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_or(node); end - def validate_config; end - - private - - def autocorrect(corrector, node); end - def check_and_or(node); end - def message(node, lhs, rhs); end - def offending_range(node, lhs, rhs, given_style); end - def relevant_node?(node); end - def right_hand_side(send_node); end - def should_align?(node, rhs, given_style); end -end - -class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def autocorrect(corrector, node); end - def base_column(node, args); end - def fixed_indentation?; end - def message(_node); end - def target_method_lineno(node); end -end - -RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def check_assignment(node, _rhs); end - def comment_within?(node); end - def configured_to_not_be_inspected?(node); end - def convertible_block?(node); end - def max_line_length; end - def offense?(node); end - def other_cop_takes_precedence?(node); end - def register_offense(node); end - def single_line_block_chain_enabled?; end - def suitable_as_single_line?(node); end - def to_single_line(source); end - def too_long?(node); end -end - -RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end - def on_new_investigation; end - def on_resbody(node); end - - private - - def access_modifier?(node); end - def access_modifier_node(node); end - def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end - def aligned_with_line_break_method?(ancestor_node, node); end - def alignment_location(alignment_node); end - def alignment_node(node); end - def alignment_source(node, starting_loc); end - def ancestor_node(node); end - def assignment_node(node); end - def autocorrect(corrector, node, alignment_location); end - def begin_end_alignment_style; end - def check(node); end - def format_message(alignment_node, alignment_loc, kw_loc); end - def modifier?(node); end - def whitespace_range(node); end -end - -RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end - def offending_range(node); end - def selector_range(node); end -end - -RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_kwoptarg(node); end - def on_pair(node); end - - private - - def followed_by_space?(colon); end - def register_offense(colon); end -end - -RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end - def space_style_before_rcurly; end -end - -class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def whitespace_after_operator?(node); end -end - -RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end - def space_style_before_rcurly; end -end - -class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def check_after_closing_pipe(arguments); end - def check_arg(arg); end - def check_closing_pipe_space(arguments, closing_pipe); end - def check_each_arg(args); end - def check_inside_pipes(arguments); end - def check_no_space(space_begin_pos, space_end_pos, msg); end - def check_no_space_style_inside_pipes(arguments); end - def check_opening_pipe_space(arguments, opening_pipe); end - def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end - def check_space_style_inside_pipes(arguments); end - def last_end_pos_inside_pipes(arguments, range); end - def pipes(arguments); end - def pipes?(arguments); end - def style_parameter_name; end -end - -class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_optarg(node); end - - private - - def autocorrect(corrector, range); end - def check_optarg(arg, equals, value); end - def incorrect_style_detected(arg, value); end - def message(_node); end - def no_surrounding_space?(arg, equals); end - def space_on_both_sides?(arg, equals); end -end - -RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_block(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_defined?(node); end - def on_ensure(node); end - def on_for(node); end - def on_if(node); end - def on_if_guard(node); end - def on_in_pattern(node); end - def on_kwbegin(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_next(node); end - def on_or(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_return(node); end - def on_send(node); end - def on_super(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_when(node); end - def on_while(node); end - def on_yield(node); end - def on_zsuper(node); end - - private - - def accept_left_parenthesis?(range); end - def accept_left_square_bracket?(range); end - def accept_namespace_operator?(range); end - def accepted_opening_delimiter?(range, char); end - def check(node, locations, begin_keyword = T.unsafe(nil)); end - def check_begin(node, range, begin_keyword); end - def check_end(node, range, begin_keyword); end - def check_keyword(node, range); end - def do?(node); end - def namespace_operator?(range, pos); end - def preceded_by_operator?(node, _range); end - def safe_navigation_call?(range, pos); end - def space_after_missing?(range); end - def space_before_missing?(range); end -end - -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_const(node); end - def on_csend(node); end - def on_send(node); end - - private - - def check_space(begin_pos, end_pos); end - def check_space_after_dot(node); end - def check_space_after_double_colon(node); end - def check_space_before_dot(node); end -end - -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RationalLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_and_asgn(node); end - def on_assignment(node); end - def on_binary(node); end - def on_casgn(node); end - def on_class(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_pattern(node); end - def on_op_asgn(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_resbody(node); end - def on_sclass(node); end - def on_send(node); end - def on_special_asgn(node); end - - private - - def align_hash_cop_config; end - def autocorrect(corrector, range); end - def check_operator(type, operator, right_operand); end - def enclose_operator_with_space(corrector, range); end - def excess_leading_space?(type, operator, with_space); end - def excess_trailing_space?(right_operand, with_space); end - def force_equal_sign_alignment?; end - def hash_table_style?; end - def offense(type, operator, with_space, right_operand); end - def offense_message(type, operator, with_space, right_operand); end - def operator_with_regular_syntax?(send_node); end - def regular_operator?(send_node); end - def should_not_have_surrounding_space?(operator); end - def space_around_exponent_operator?; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, range); end - def block_delimiters_style; end - def check_empty(left_brace, space_plus_brace, used_style); end - def check_non_empty(left_brace, space_plus_brace, used_style); end - def conflict_with_block_delimiters?(node); end - def empty_braces?(loc); end - def space_detected(left_brace, space_plus_brace); end - def space_missing(left_brace); end - def style_for_empty_braces; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def offense_range(node, begin_pos); end - def offense_range_for_assignment(node, begin_pos); end - def reference_variable_with_brackets?(node); end - def register_offense(range); end -end - -RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end -end - -class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def expect_params_after_method_name?(node); end - def no_space_between_method_name_and_first_argument?(node); end - def regular_method_call_with_arguments?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end -end - -class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def arrow_lambda_with_args?(node); end - def lambda_arguments(node); end - def range_of_offense(node); end - def space_after_arrow(lambda_node); end - def space_after_arrow?(lambda_node); end -end - -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def array_brackets(node); end - def autocorrect(corrector, node); end - def compact(corrector, bracket, side); end - def compact_corrections(corrector, node, left, right); end - def compact_offense(node, token, side: T.unsafe(nil)); end - def compact_offenses(node, left, right, start_ok, end_ok); end - def empty_config; end - def end_has_own_line?(token); end - def index_for(node, token); end - def issue_offenses(node, left, right, start_ok, end_ok); end - def left_array_bracket(node); end - def line_and_column_for(token); end - def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end - def next_to_bracket?(token, side: T.unsafe(nil)); end - def next_to_comment?(node, token); end - def next_to_newline?(node, token); end - def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end - def right_array_bracket(node); end -end - -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def each_unnecessary_space_match(node, &blk); end -end - -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def adjacent_braces(left_brace, right_brace); end - def aligned_braces?(left_brace, right_brace); end - def braces_with_contents_inside(node, inner); end - def check_inside(node, left_brace, right_brace); end - def check_left_brace(inner, left_brace, args_delimiter); end - def check_right_brace(inner, left_brace, right_brace, single_line); end - def multiline_block?(left_brace, right_brace); end - def no_space(begin_pos, end_pos, msg); end - def no_space_inside_left_brace(left_brace, args_delimiter); end - def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end - def pipe?(args_delimiter); end - def space(begin_pos, end_pos, msg); end - def space_inside_left_brace(left_brace, args_delimiter); end - def space_inside_right_brace(right_brace); end - def style_for_empty_braces; end -end - -class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def ambiguous_or_unexpected_style_detected(style, is_match); end - def autocorrect(corrector, range); end - def check(token1, token2); end - def expect_space?(token1, token2); end - def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end - def message(brace, is_empty_braces, expect_space); end - def offense?(token1, expect_space); end - def range_of_space_to_the_left(range); end - def range_of_space_to_the_right(range); end - def space_range(token_range); end -end - -RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def can_be_ignored?(token1, token2); end - def correct_extaneus_space_between_consecutive_parens(token1, token2); end - def correct_extraneous_space(tokens); end - def correct_extraneous_space_in_empty_parens(token1, token2); end - def correct_missing_space(token1, token2); end - def left_parens?(token1, token2); end - def parens?(token1, token2); end - def process_with_compact_style(tokens); end - def process_with_space_style(tokens); end - def right_parens?(token1, token2); end -end - -RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - def on_xstr(node); end - - private - - def add_offenses_for_unnecessary_spaces(node); end - def regex_matches(node, &blk); end -end - -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_erange(node); end - def on_irange(node); end - - private - - def check(node); end -end - -RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def closing_bracket(tokens, opening_bracket); end - def empty_config; end - def left_ref_bracket(node, tokens); end - def previous_token(current_token); end - def reference_brackets(node); end -end - -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - - private - - def autocorrect(corrector, begin_node); end - def delimiters(begin_node); end -end - -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def ends_in_end?(processed_source); end - def message(wanted_blank_lines, blank_lines); end - def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end -end - -class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(_node); end - def on_new_investigation; end - - private - - def extract_heredocs(ast); end - def find_heredoc(line_number); end - def offense_range(lineno, line); end - def process_line(line, lineno); end - def process_line_in_heredoc(corrector, range, heredoc); end - def skip_heredoc?; end - def static?(heredoc); end - def whitespace_is_indentation?(range, level); end - def whitespace_only?(range); end -end - -RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Legacy; end - -class RuboCop::Cop::Legacy::CorrectionsProxy - def initialize(corrector); end - - def <<(callable); end - def concat(corrections); end - def empty?; end - - protected - - def corrector; end - - private - - def suppress_clobbering; end -end - -class RuboCop::Cop::LineBreakCorrector - extend ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::TrailingBody - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end - def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end - def move_comment(eol_comment:, node:, corrector:); end - def processed_source; end - - private - - def remove_semicolon(node, corrector); end - def semicolon(node); end - end -end - -module RuboCop::Cop::LineLengthHelp - private - - def allow_uri?; end - def allowed_uri_position?(line, uri_range); end - def directive_on_source_line?(line_index); end - def find_excessive_uri_range(line); end - def ignore_cop_directives?; end - def indentation_difference(line); end - def line_length(line); end - def line_length_without_directive(line); end - def match_uris(string); end - def tab_indentation_width; end - def uri_regexp; end - def valid_uri?(uri_ish_string); end -end - -module RuboCop::Cop::Lint; end - -class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def rhs(node); end -end - -RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - - def on_csend(node); end - def on_send(node); end - - private - - def allowed_method?(node); end - def ambiguous_block_association?(send_node); end - def message(send_node); end -end - -RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def find_offense_node_by(diagnostic); end - def message(diagnostic); end - def offense_node(node); end - def offense_position?(node, diagnostic); end - def unary_operator?(node, diagnostic); end -end - -RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_new_investigation; end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def greater_precedence?(node1, node2); end - def operator?(node); end - def operator_name(node); end - def precedence(node); end -end - -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_erange(node); end - def on_irange(node); end - - private - - def acceptable?(node); end - def acceptable_call?(node); end - def each_boundary(range); end - def require_parentheses_for_method_chain?; end -end - -RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def find_offense_node(node, regexp_receiver); end - def find_offense_node_by(diagnostic); end - def first_argument_is_regexp?(node); end - def method_chain_to_regexp_receiver?(node, regexp_receiver); end -end - -RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def allowed_construct?(asgn_node); end - def conditional_assignment?(asgn_node); end - def message(_node); end - def skip_children?(asgn_node); end - def traverse_node(node, &block); end -end - -RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def big_decimal_new(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base - def on_and(node); end - def on_or(node); end - def on_send(node); end -end - -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def boolean_symbol?(param0 = T.unsafe(nil)); end - def on_sym(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - def on_kwoptarg(node); end - def on_optarg(node); end - - private - - def check_for_circular_argument_references(arg_name, arg_value); end -end - -RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def constant_assigned_in_block?(param0 = T.unsafe(nil)); end - def module_defined_in_block?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - def on_class(node); end - def on_module(node); end - - private - - def method_name(node); end -end - -RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base - def on_const(node); end - def unqualified_const?(param0 = T.unsafe(nil)); end - - private - - def allowed_names; end - def const_name?(name); end - def ignored_names; end -end - -RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - def kernel?(param0 = T.unsafe(nil)); end - def on_send(node); end - def valid_receiver?(param0 = T.unsafe(nil), param1); end - - private - - def debugger_method?(send_node); end - def debugger_methods; end - def message(node); end -end - -RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def check(node); end - def replacement(deprecated); end -end - -RuboCop::Cop::Lint::DeprecatedClassMethods::CLASS_METHOD_DELIMETER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::DEPRECATED_METHODS_OBJECT = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Lint::DeprecatedClassMethods::DeprecatedClassMethod - include ::RuboCop::AST::Sexp - - def initialize(method, class_constant: T.unsafe(nil), correctable: T.unsafe(nil)); end - - def class_constant; end - def class_nodes; end - def correctable?; end - def method; end - def to_s; end - - private - - def delimiter; end -end - -RuboCop::Cop::Lint::DeprecatedClassMethods::INSTANCE_METHOD_DELIMETER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DeprecatedClassMethods::Replacement - def initialize(method, class_constant: T.unsafe(nil), instance_method: T.unsafe(nil)); end - - def class_constant; end - def method; end - def to_s; end - - private - - def delimiter; end - def instance_method?; end -end - -class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_const(node); end - - private - - def constant_name(node, nested_constant_name); end - def deprecated_constants; end - def message(good, bad, deprecated_version); end -end - -RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def algorithm_const(param0 = T.unsafe(nil)); end - def digest_const?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def algorithm_name(node); end - def autocorrect(corrector, node); end - def build_cipher_arguments(node, algorithm_name, no_arguments); end - def correction_range(node); end - def message(node); end - def openssl_class(node); end - def replacement_args(node); end - def sanitize_arguments(arguments); end -end - -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def check(node); end - def check_body(body); end - def check_body_lines(lines); end - def check_disjunctive_assignment(node); end -end - -RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - def on_branching_statement(node); end - def on_case(node); end - def on_case_match(node); end - def on_if(node); end - def on_rescue(node); end - - private - - def branches(node); end - def consider_branch?(branch); end - def const_branch?(branch); end - def ignore_constant_branches?; end - def ignore_literal_branches?; end - def literal_branch?(branch); end - def offense_range(duplicate_branch); end -end - -RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - def on_case(case_node); end -end - -RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base - def on_if(node); end -end - -RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Duplication - - def on_hash(node); end -end - -RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def alias_method?(param0 = T.unsafe(nil)); end - def method_alias?(param0 = T.unsafe(nil)); end - def on_alias(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def sym_name(param0 = T.unsafe(nil)); end - - private - - def check_const_receiver(node, name, const_name); end - def check_self_receiver(node, name); end - def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - def found_instance_method(node, name); end - def found_method(node, method_name); end - def lookup_constant(node, const_name); end - def message_for_dup(node, method_name); end - def on_attr(node, attr_name, args); end - def possible_dsl?(node); end - def qualified_name(enclosing, namespace, mod_name); end - def source_location(node); end -end - -RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def each_repeated_character_class_element_loc(node); end - def on_regexp(node); end - - private - - def interpolation_locs(node); end - def within_interpolation?(node, child); end -end - -RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base - def on_new_investigation; end - def on_send(node); end - def require_call?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - def on_rescue(node); end -end - -RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - def each_with_object?(param0 = T.unsafe(nil)); end - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, node, first_else); end - def check(node); end - def check_else(node); end - def indentation_width; end -end - -RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base - def on_block(node); end - - private - - def allow_comment?(node); end - def allow_empty_lambdas?; end - def comment_disables_cop?(comment); end - def lambda_or_proc?(node); end -end - -RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base - def on_class(node); end - def on_sclass(node); end - - private - - def body_or_allowed_comment_lines?(node); end -end - -RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base - def on_if(node); end -end - -RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end -end - -RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base - def on_begin(node); end - - private - - def empty_expression?(begin_node); end -end - -RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def contains_only_comments?; end - def empty_file?; end - def offending?; end -end - -RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - def on_case_match(node); end -end - -RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end -end - -RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base - def on_case(node); end -end - -RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end -end - -RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def build_kwargs(node); end - def correct_arguments?(arguments); end - def override_by_legacy_args(kwargs, node); end -end - -RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base - def on_eflipflop(node); end - def on_iflipflop(node); end -end - -RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def check_numeric_returning_method(node); end - def check_send(node); end - def float?(node); end -end - -RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - def on_float(node); end -end - -RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - def called_on_string?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def count_format_matches(node); end - def count_matches(node); end - def count_percent_matches(node); end - def countable_format?(node); end - def countable_percent?(node); end - def expected_fields_count(node); end - def format?(node); end - def format_method?(name, node); end - def format_string?(node); end - def heredoc?(node); end - def invalid_format_string?(node); end - def matched_arguments_count?(expected, passed); end - def message(node); end - def method_with_format_args?(node); end - def offending_node?(node); end - def percent?(node); end - def splat_args?(node); end - def sprintf?(node); end -end - -RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base - def id_as_hash_key?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def all_on_same_line?(nodes); end - def autocorrect(corrector, node, heredoc); end - def call_after_heredoc_range(heredoc); end - def call_end_pos(node); end - def call_line_range(node); end - def call_range_to_safely_reposition(node, heredoc); end - def calls_on_multiple_lines?(node, _heredoc); end - def correctly_positioned?(node, heredoc); end - def heredoc_begin_line_range(heredoc); end - def heredoc_end_pos(heredoc); end - def heredoc_node?(node); end - def heredoc_node_descendent_receiver(node); end - def send_node?(node); end - def trailing_comma?(call_source, call_line_source); end -end - -RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def compare_between_object_id_by_double_equal?(node); end - def object_id_method?(node); end -end - -RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - def on_dstr(node); end - - private - - def display_str(node); end - def each_bad_cons(node); end - def ending_delimiter(str); end - def str_content(node); end - def string_literal?(node); end - def string_literals?(node1, node2); end -end - -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def io_select(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def preferred_method(read, write, timeout); end - def scheduler_compatible?(io1, io2); end -end - -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - def on_class(node); end - def on_module(node); end - def private_class_methods(param0); end - - private - - def access_modifier?(node); end - def check_node(node); end - def correct_visibility?(node, modifier, ignored_methods); end - def format_message(modifier); end - def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - def private_class_method_names(node); end -end - -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def class_new_call?(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_send(node); end - - private - - def illegal_class_name?(class_node); end - def message(node); end - def preferred_base_class; end -end - -RuboCop::Cop::Lint::InheritException::ILLEGAL_CLASSES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_str(node); end - - private - - def autocorrect(corrector, node); end - def heredoc?(node); end -end - -RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def message(node); end - def on_case(case_node); end - def on_case_match(case_match_node); end - def on_if(node); end - def on_send(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def basic_literal?(node); end - def check_case(case_node); end - def check_for_literal(node); end - def check_node(node); end - def condition(node); end - def handle_node(node); end - def primitive_array?(node); end - def when_conditions_range(when_node); end -end - -RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - - private - - def autocorrected_value(node); end - def autocorrected_value_for_array(node); end - def autocorrected_value_for_string(node); end - def autocorrected_value_for_symbol(node); end - def ends_heredoc_line?(node); end - def in_array_percent_literal?(node); end - def offending?(node); end - def prints_as_self?(node); end - def space_literal?(node); end - def special_keyword?(node); end -end - -RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_until_post(node); end - def on_while_post(node); end - - private - - def build_break_line(node); end - def keyword_and_condition_range(node); end - def register_offense(node); end -end - -RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def department_enabled?(cop, comment); end - def each_missing_enable; end - def max_range; end - def message(cop, comment, type = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def callback_method_def?(node); end - def contains_super?(node); end - def inside_class_with_stateful_parent?(node); end - def offender?(node); end - def stateless_class?(node); end -end - -RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base - def on_regexp(node); end -end - -RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def multiple_compare?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end - def eval_call?(param0 = T.unsafe(nil)); end - def exec_call?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def scoping_method_call?(child); end -end - -RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - - def on_array(node); end - def on_percent_literal(node); end - - private - - def contains_percent_literals?(node); end -end - -RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - def on_block(node); end - def on_body_of_reduce(param0 = T.unsafe(nil)); end - - private - - def parent_block_node(node); end -end - -RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - def on_lvasgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end -end - -RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def loop_variable(param0 = T.unsafe(nil)); end - def method_require?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_block_pass(node); end - def unsorted_dir_block?(param0 = T.unsafe(nil)); end - def unsorted_dir_each?(param0 = T.unsafe(nil)); end - def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end - def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - def var_is_required?(param0, param1); end - - private - - def correct_block(corrector, node); end - def correct_block_pass(corrector, node); end - def last_arg_range(node); end - def unsorted_dir_loop?(node); end - def unsorted_dir_pass?(node); end -end - -RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base - def chained_send?(param0 = T.unsafe(nil)); end - def define_method?(param0 = T.unsafe(nil)); end - def on_return(return_node); end - - private - - def return_value?(return_node); end - def scoped_node?(node); end -end - -RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::IgnoredMethods::Config - - def on_send(node); end - def to_method(param0 = T.unsafe(nil)); end - def to_method_symbol(param0 = T.unsafe(nil)); end - - private - - def conversion_method?(method_name); end - def correct_method(node, receiver); end - def correct_sym_method(to_method); end - def handle_as_symbol(node); end - def handle_conversion_method(node); end - def ignore_receiver?(receiver); end - def ignored_class?(name); end - def ignored_classes; end - def remove_parentheses(corrector, node); end - def top_receiver(node); end -end - -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base - def on_lvasgn(node); end -end - -RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) -RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_or_asgn(node); end -end - -RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, encoding_line, frozen_string_literal_line); end - def magic_comment_lines; end - def magic_comments; end -end - -RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base - def after_send(node); end - def on_match_with_lvasgn(node); end - def on_new_investigation; end - def on_nth_ref(node); end - def on_when(node); end - - private - - def check_regexp(node); end - def nth_ref_receiver?(send_node); end - def regexp_first_argument?(send_node); end - def regexp_receiver?(send_node); end -end - -RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def chained_calls?(node); end - def first_argument_starts_with_left_parenthesis?(node); end - def space_range(expr, space_length); end - def spaces_before_left_parenthesis(node); end - def ternary_expression?(node); end - def valid_context?(node); end - def valid_first_argument?(first_arg); end -end - -RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def contains_quotes_or_commas?(node); end -end - -RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def autocorrect(corrector, node); end - def contains_colons_or_commas?(node); end - def non_alphanumeric_literal?(literal); end -end - -RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def exception?(param0 = T.unsafe(nil)); end - def exception_new_with_message?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allow_implicit_namespaces; end - def check(node); end - def implicit_namespace?(node); end -end - -RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - def on_send(node); end - def rand_one?(param0 = T.unsafe(nil)); end - - private - - def message(node); end -end - -RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end - - def offenses_to_check; end - def offenses_to_check=(_arg0); end - def on_new_investigation; end - - private - - def add_department_marker(department); end - def add_offense_for_entire_comment(comment, cops); end - def add_offense_for_some_cops(comment, cops); end - def add_offenses(redundant_cops); end - def all_cop_names; end - def all_disabled?(comment); end - def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end - def cop_disabled_line_ranges; end - def cop_range(comment, cop); end - def department_disabled?(cop, comment); end - def department_marker?(department); end - def describe(cop); end - def directive_count(comment); end - def directive_range_in_list(range, ranges); end - def disabled_ranges; end - def each_already_disabled(cop, line_ranges); end - def each_line_range(cop, line_ranges); end - def each_redundant_disable(&block); end - def ends_its_line?(range); end - def find_redundant_all(range, next_range); end - def find_redundant_cop(cop, range); end - def find_redundant_department(cop, range); end - def followed_ranges?(range, next_range); end - def ignore_offense?(line_range); end - def matching_range(haystack, needle); end - def message(cop_names); end - def previous_line_blank?(range); end - def range_with_offense?(range, offenses = T.unsafe(nil)); end - def remove_department_marker(department); end - def trailing_range?(ranges, range); end -end - -RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def all_or_name(name); end - def comment_start(comment); end - def cop_name_indention(comment, name); end - def department?(directive, name); end - def range_of_offense(comment, name); end - def range_to_remove(begin_pos, end_pos, comment); end - def range_with_comma(comment, name); end - def range_with_comma_after(comment, start, begin_pos, end_pos); end - def range_with_comma_before(start, begin_pos, end_pos); end - def register_offense(comment, cop_names); end -end - -RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end -end - -RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def unnecessary_require_statement?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end - - private - - def check?(node); end - def condition?(parent, node); end -end - -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def array_new?(param0 = T.unsafe(nil)); end - def literal_expansion(param0 = T.unsafe(nil)); end - def on_splat(node); end - - private - - def allow_percent_literal_array_argument?; end - def array_new_inside_array_literal?(array_new_node); end - def array_splat?(node); end - def autocorrect(corrector, node); end - def method_argument?(node); end - def part_of_an_array?(node); end - def redundant_brackets?(node); end - def redundant_splat_expansion(node); end - def remove_brackets(array); end - def replacement_range_and_content(node); end - def use_percent_literal_array_argument?(node); end -end - -RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - def to_s_without_args?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_with_index?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def with_index_range(send); end -end - -RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_with_object?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def with_object_range(send); end -end - -RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_match_current_line(node); end -end - -RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_csend(node); end - def on_send(node); end - - private - - def check_predicate(predicate, node); end - def check_ternary(ternary, node); end -end - -RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def remove_ext(file_path); end - def same_file?(file_path, required_feature); end -end - -RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - def on_resbody(node); end - def targets_exception?(rescue_arg_node); end -end - -RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def on_resbody(node); end - - private - - def correction(*exceptions); end - def invalid_exceptions(exceptions); end - def valid_exceptions(exceptions); end -end - -RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - def on_return(return_node); end - - private - - def method_name(context_node); end - def non_void_context(return_node); end - def setter_method?(method_name); end - def void_context_method?(method_name); end -end - -RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - - def bad_method?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def method_chain(node); end -end - -RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - - def check(node); end - def on_csend(node); end - - private - - def autocorrect(corrector, node); end - def location(node, unsafe_method_call); end - def top_conditional_ancestor(node); end - def unsafe_method_calls(method_calls, safe_nav_receiver); end -end - -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(comment); end - def executable?(processed_source); end - def format_message_from(processed_source); end -end - -RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - def on_and_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_or_asgn(node); end - - private - - def multiple_self_assignment?(node); end - def rhs_matches_lhs?(rhs, lhs); end -end - -RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def send_with_mixin_argument?(param0 = T.unsafe(nil)); end - - private - - def bad_location(node); end - def message(method, module_name, bad_method); end - def mixin_method?(node); end -end - -RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def uses_var?(param0, param1); end - - private - - def argument_references(argument); end - def assignment_without_argument_usage(argument); end - def check_argument(argument); end - def ignore_implicit_references?; end - def node_within_block_or_conditional?(node, stop_search_node); end - def reference_pos(node); end - def shadowing_assignment(argument); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::RangeHelp - - def on_rescue(node); end - - private - - def compare_exceptions(exception, other_exception); end - def contains_multiple_levels_of_exceptions?(group); end - def evaluate_exceptions(group); end - def find_shadowing_rescue(rescues); end - def offense_range(rescues); end - def rescued_exceptions(rescue_group); end - def rescued_groups_for(rescues); end - def sorted?(rescued_groups); end - def system_call_err?(error); end -end - -RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - def before_declaring_variable(variable, variable_table); end - def ractor_block?(param0 = T.unsafe(nil)); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base - def on_send(node); end - def struct_new(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base - def on_resbody(node); end - - private - - def comment_between_rescue_and_end?(node); end - def nil_body?(node); end -end - -RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - def on_send(node); end - def on_sym(node); end - - private - - def correct_hash_key(node); end - def correct_inconsistent_hash_keys(keys); end - def in_alias?(node); end - def in_percent_literal_array?(node); end - def properly_quoted?(source, value); end - def register_offense(node, correction:, message: T.unsafe(nil)); end - def requires_quotes?(sym_node); end -end - -RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base - def on_other_file; end - - private - - def add_offense_from_diagnostic(diagnostic, ruby_version); end - def add_offense_from_error(error); end - def beautify_message(message); end -end - -class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base - def enum_conversion_call?(param0 = T.unsafe(nil)); end - def method_name?(param0 = T.unsafe(nil), param1); end - def on_send(node); end - def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end - - private - - def argument_match?(send_arg, def_arg); end - def arguments_match?(arguments, def_node); end -end - -RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end -end - -RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base - def on_return(return_node); end - - private - - def ancestors_valid?(return_node); end -end - -RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def trailing_comma_range(node); end -end - -RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TripleQuotes < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def empty_str_nodes(node); end -end - -RuboCop::Cop::Lint::TripleQuotes::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnderscorePrefixedVariableName < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def check_variable(variable); end - - private - - def allowed_keyword_block_argument?(variable); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::UnderscorePrefixedVariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base - def on_block(node); end - def on_numblock(node); end - - private - - def acceptable?(node); end - def arg_count(node); end - def expected_arity(method); end - def included_method?(name); end - def methods; end -end - -RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - def on_const(node); end -end - -RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base - def accumulator_index?(param0 = T.unsafe(nil), param1); end - def element_modified?(param0, param1); end - def expression_values(param0); end - def lvar_used?(param0 = T.unsafe(nil), param1); end - def on_block(node); end - def on_numblock(node); end - def reduce_with_block?(param0 = T.unsafe(nil)); end - - private - - def acceptable_return?(return_val, element_name); end - def allowed_type?(parent_node); end - def block_arg_name(node, index); end - def check_return_values(block_node); end - def potential_offense?(return_values, block_body, element_name, accumulator_name); end - def return_values(block_body_node); end - def returned_accumulator_index(return_values, accumulator_name, element_name); end - def returns_accumulator_anywhere?(return_values, accumulator_name); end -end - -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - def flow_command?(param0 = T.unsafe(nil)); end - def on_begin(node); end - def on_kwbegin(node); end - - private - - def check_case(node); end - def check_if(node); end - def flow_expression?(node); end -end - -RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredPattern - - def break_command?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_for(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def break_statement?(node); end - def check(node); end - def check_case(node); end - def check_if(node); end - def conditional_continue_keyword?(break_statement); end - def loop_method?(node); end - def preceded_by_continue_statement?(break_statement); end - def statements(node); end -end - -RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::AST::NodePattern::Macros - - def after_leaving_scope(scope, _variable_table); end - - private - - def check_argument(variable); end -end - -class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - private - - def allow_unused_keyword_arguments?; end - def allowed_block?(variable); end - def allowed_keyword_argument?(variable); end - def augment_message(message, variable); end - def autocorrect(corrector, node); end - def check_argument(variable); end - def define_method_call?(variable); end - def empty_block?(variable); end - def ignore_empty_blocks?; end - def message(variable); end - def message_for_lambda(variable, all_arguments); end - def message_for_normal_block(variable, all_arguments); end - def message_for_underscore_prefix(variable); end - def used_block_local?(variable); end - def variable_type(variable); end - - class << self - def joining_forces; end - end -end - -class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - def not_implemented?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def check_argument(variable); end - def ignored_method?(body); end - def message(variable); end - - class << self - def joining_forces; end - end -end - -class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base - def on_send(node); end - def uri_escape_unescape?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def class_or_instance_eval?(param0 = T.unsafe(nil)); end - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end - def dynamic_method_definition?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - def static_method_definition?(param0 = T.unsafe(nil)); end - - private - - def access_modifier?(node); end - def any_context_creating_methods?(child); end - def any_method_definition?(child); end - def autocorrect(corrector, node); end - def check_child_nodes(node, unused, cur_vis); end - def check_new_visibility(node, unused, new_vis, cur_vis); end - def check_node(node); end - def check_scope(node); end - def check_send_node(node, cur_vis, unused); end - def eval_call?(child); end - def method_definition?(child); end - def start_of_new_scope?(child); end -end - -RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def check_for_unused_assignments(variable); end - def collect_variable_like_names(scope); end - def message_for_useless_assignment(assignment); end - def message_specification(assignment, variable); end - def multiple_assignment_message(variable_name); end - def operator_assignment_message(scope, assignment); end - def return_value_node_of_scope(scope); end - def similar_name_message(variable); end - def variable_like_method_invocation?(node); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - def on_new_investigation; end -end - -RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def delegating?(node, def_node); end - def optional_args?(node); end -end - -RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base - def method_definition(param0 = T.unsafe(nil), param1); end - def on_send(node); end - - private - - def allowed_arguments(arguments); end - def inspect_def(node, def_node); end - def inspect_sym(node, sym_node); end -end - -RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end - - private - - def last_expression(body); end -end - -RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker - def initialize(body_node); end - - def constructor?(node); end - def contain_local_object?(variable_name); end - def process_assignment(asgn_node, rhs_node); end - def process_assignment_node(node); end - def process_binary_operator_assignment(op_asgn_node); end - def process_logical_operator_assignment(asgn_node); end - def process_multiple_assignment(masgn_node); end - def scan(node, &block); end -end - -class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_arg(param0 = T.unsafe(nil)); end - def block_reassigns_arg?(param0, param1); end - def on_send(node); end - def times_call?(param0 = T.unsafe(nil)); end - - private - - def autocorrect_block(corrector, node); end - def autocorrect_block_pass(corrector, node, proc_name); end - def fix_indentation(source, range); end - def never_process?(count, node); end - def own_line?(node); end - def remove_node(corrector, node); end -end - -RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base - def on_begin(node); end - def on_block(node); end - def on_kwbegin(node); end - - private - - def check_begin(node); end - def check_defined(node); end - def check_expression(expr); end - def check_literal(node); end - def check_nonmutating(node); end - def check_self(node); end - def check_var(node); end - def check_void_op(node); end - def in_void_context?(node); end -end - -RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::DEFINED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::MatchRange - include ::RuboCop::Cop::RangeHelp - - private - - def each_match_range(range, regex); end - def match_range(range, match); end -end - -class RuboCop::Cop::MessageAnnotator - def initialize(config, cop_name, cop_config, options); end - - def annotate(message); end - def config; end - def cop_config; end - def cop_name; end - def options; end - def urls; end - - private - - def debug?; end - def details; end - def display_cop_names?; end - def display_style_guide?; end - def extra_details?; end - def reference_urls; end - def style_guide_base_url; end - def style_guide_url; end - - class << self - def style_guide_urls; end - end -end - -module RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::IgnoredMethods - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - mixes_in_class_methods ::RuboCop::Cop::IgnoredMethods::Config - - def define_method?(param0 = T.unsafe(nil)); end - def max=(value); end - def on_block(node); end - def on_def(node); end - def on_defs(node); end - - private - - def check_complexity(node, method_name); end - def complexity(body); end - - class << self - def included(base); end - end -end - -module RuboCop::Cop::MethodPreference - private - - def default_cop_config; end - def preferred_method(method); end - def preferred_methods; end -end - -module RuboCop::Cop::Metrics; end - -class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredMethods - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - extend ::RuboCop::Cop::IgnoredMethods::Config - - private - - def complexity(node); end -end - -RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - - def on_block(node); end - def on_numblock(node); end - - private - - def cop_label; end - def method_receiver_excluded?(node); end -end - -RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base - def max=(value); end - def on_new_investigation; end - - private - - def check_nesting_level(node, max, current_level); end - def consider_node?(node); end - def count_blocks?; end - def message(max); end -end - -RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - def on_casgn(node); end - def on_class(node); end - - private - - def message(length, max_length); end -end - -class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredMethods - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - extend ::RuboCop::Cop::IgnoredMethods::Config - - private - - def complexity_score_for(node); end - def count_block?(block); end -end - -RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_numblock(node); end - - private - - def cop_label; end -end - -RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - def module_definition?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - def on_module(node); end - - private - - def message(length, max_length); end -end - -class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base - def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end - def max=(value); end - def max_optional_parameters=(value); end - def on_args(node); end - def on_def(node); end - def on_defs(node); end - - private - - def args_count(node); end - def count_keyword_args?; end - def max_optional_parameters; end - def max_params; end -end - -RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity - private - - def complexity_score_for(node); end -end - -RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Metrics::Utils; end - -class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator - include ::RuboCop::AST::Sexp - include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - - def calculate; end - def else_branch?(node); end - def evaluate_condition_node(node); end - - private - - def argument?(node); end - def assignment?(node); end - def branch?(node); end - def capturing_variable?(name); end - def compound_assignment(node); end - def condition?(node); end - def simple_assignment?(node); end - def visit_depth_last(node, &block); end - - class << self - def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end - end -end - -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end - - def calculate; end - - private - - def build_foldable_checks(types); end - def classlike_code_length(node); end - def classlike_node?(node); end - def code_length(node); end - def count_comments?; end - def each_top_level_descendant(node, types, &block); end - def extract_body(node); end - def foldable_node?(node); end - def heredoc_length(node); end - def heredoc_node?(node); end - def irrelevant_line?(source_line); end - def line_numbers_of_inner_nodes(node, *types); end - def namespace_module?(node); end - def normalize_foldable_types(types); end -end - -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Metrics::Utils::IteratingBlock - def block_method_name(node); end - def iterating_block?(node); end - def iterating_method?(name); end -end - -RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) - -module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - def attribute_call?(param0 = T.unsafe(nil)); end - def calculate_node(node); end - def discount_repeated_attributes?; end - def evaluate_branch_nodes(node); end - def root_node?(param0 = T.unsafe(nil)); end - - private - - def discount_repeated_attribute?(send_node); end - def find_attributes(node, &block); end - def setter_to_getter(node); end - def update_repeated_attribute(node); end -end - -RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) - -module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - def discount_for_repeated_csend?(csend_node); end - def reset_on_lvasgn(node); end - def reset_repeated_csend; end -end - -module RuboCop::Cop::Migration; end - -class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def check_cop_name(name, comment, offset); end - def contain_unexpected_character_for_department_name?(name); end - def disable_comment_offset; end - def qualified_legacy_cop_name(cop_name); end - def valid_content_token?(content_token); end -end - -RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::MinBodyLength - private - - def min_body_length; end - def min_body_length?(node); end -end - -module RuboCop::Cop::MultilineElementIndentation - private - - def base_column(left_brace, left_parenthesis); end - def check_expected_style(styles); end - def check_first(first, left_brace, left_parenthesis, offset); end - def detected_styles(actual_column, offset, left_parenthesis, left_brace); end - def detected_styles_for_column(column, left_parenthesis, left_brace); end - def each_argument_node(node, type); end - def incorrect_style_detected(styles, first, left_parenthesis); end -end - -module RuboCop::Cop::MultilineElementLineBreaks - private - - def all_on_same_line?(nodes); end - def check_line_breaks(_node, children); end -end - -module RuboCop::Cop::MultilineExpressionIndentation - def on_send(node); end - - private - - def argument_in_method_call(node, kind); end - def assignment_rhs(node); end - def check(range, node, lhs, rhs); end - def correct_indentation(node); end - def disqualified_rhs?(candidate, ancestor); end - def grouped_expression?(node); end - def incorrect_style_detected(range, node, lhs, rhs); end - def indentation(node); end - def indented_keyword_expression(node); end - def inside_arg_list_parentheses?(node, ancestor); end - def keyword_message_tail(node); end - def kw_node_with_special_indentation(node); end - def left_hand_side(lhs); end - def not_for_this_cop?(node); end - def operation_description(node, rhs); end - def part_of_assignment_rhs(node, candidate); end - def part_of_block_body?(candidate, block_node); end - def postfix_conditional?(node); end - def valid_method_rhs_candidate?(candidate, node); end - def valid_rhs?(candidate, ancestor); end - def valid_rhs_candidate?(candidate, node); end - def within_node?(inner, outer); end -end - -RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::MultilineLiteralBraceCorrector - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::RangeHelp - - def initialize(corrector, node, processed_source); end - - def call; end - - private - - def content_if_comment_present(corrector, node); end - def correct_next_line_brace(corrector); end - def correct_same_line_brace(corrector); end - def corrector; end - def last_element_range_with_trailing_comma(node); end - def last_element_trailing_comma_range(node); end - def node; end - def processed_source; end - def remove_trailing_content_of_comment(corrector, range); end - def select_content_to_be_inserted_after_last_element(corrector, node); end - - class << self - def correct(corrector, node, processed_source); end - end -end - -module RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - private - - def check(node); end - def check_brace_layout(node); end - def check_new_line(node); end - def check_same_line(node); end - def check_symmetrical(node); end - def children(node); end - def closing_brace_on_same_line?(node); end - def empty_literal?(node); end - def ignored_literal?(node); end - def implicit_literal?(node); end - def last_line_heredoc?(node, parent = T.unsafe(nil)); end - def new_line_needed_before_closing_brace?(node); end - def opening_brace_on_same_line?(node); end -end - -module RuboCop::Cop::Naming; end - -class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def bad_reader_name?(node); end - def bad_writer_name?(node); end - def message(node); end -end - -RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def first_non_ascii_chars(string); end - def first_offense_range(identifier); end - def should_check?(token); end -end - -RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def op_method_candidate?(param0 = T.unsafe(nil)); end - - private - - def op_method?(name); end -end - -RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_def(node); end - def on_defs(node); end - - private - - def anonymous_block_argument?(node); end - def expected_block_forwarding_style?(node, last_argument); end - def explicit_block_argument?(node); end - def register_offense(block_argument); end - def use_block_argument_as_local_variable?(node, last_argument); end - def use_kwarg_in_method_definition?(node); end -end - -RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - def on_block(node); end -end - -class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base - def on_class(node); end - def on_module(node); end -end - -RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base - def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - def literal_receiver?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - - private - - def allowed_assignment?(value); end - def allowed_conditional_expression_on_rhs?(node); end - def allowed_method_call_on_rhs?(node); end - def contains_contant?(node); end -end - -RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - def struct_definition(param0 = T.unsafe(nil)); end - - private - - def allowed_acronyms; end - def bad_filename_allowed?; end - def check_definition_path_hierarchy?; end - def defined_struct(node); end - def definition_path_hierarchy_roots; end - def expect_matching_definition?; end - def filename_good?(basename); end - def find_class_or_module(node, namespace); end - def find_definition(node); end - def for_bad_filename(file_path); end - def ignore_executable_scripts?; end - def match?(expected); end - def match_acronym?(expected, name); end - def match_namespace(node, namespace, expected); end - def matching_class?(file_name); end - def matching_definition?(file_path); end - def no_definition_message(basename, file_path); end - def other_message(basename); end - def partial_matcher!(expected); end - def perform_class_and_module_naming_checks(file_path, basename); end - def regex; end - def to_module_name(basename); end - def to_namespace(path); end -end - -RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def correct_case_delimiters?(node); end - def correct_delimiters(source); end - def message(_node); end -end - -RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - - def on_heredoc(node); end - - private - - def forbidden_delimiters; end - def meaningful_delimiters?(node); end -end - -RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_new_investigation; end - - private - - def add_offenses_for_token(token, word_locations); end - def add_to_flagged_term_hash(regex_string, term, term_definition); end - def array_to_ignorecase_regex(strings); end - def check_token?(type); end - def create_message(word, message = T.unsafe(nil)); end - def create_multiple_word_message_for_file(words); end - def create_single_word_message_for_file(word); end - def ensure_regex_string(regex); end - def extract_regexp(term, term_definition); end - def find_flagged_term(word); end - def format_suggestions(suggestions); end - def investigate_filepath; end - def investigate_tokens; end - def mask_input(str); end - def preprocess_check_config; end - def preprocess_flagged_terms; end - def preprocess_suggestions(suggestions); end - def process_allowed_regex(allowed); end - def scan_for_words(input); end - def set_regexes(flagged_term_strings, allowed_strings); end -end - -RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct - def position; end - def position=(_); end - def word; end - def word=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def defined_memoized?(param0 = T.unsafe(nil), param1); end - def method_definition?(param0 = T.unsafe(nil)); end - def on_defined?(node); end - def on_or_asgn(node); end - - private - - def find_definition(node); end - def matches?(method_name, ivar_assign); end - def message(variable); end - def style_parameter_name; end - def suggested_var(method_name); end - def variable_name_candidates(method_name); end -end - -RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::IgnoredPattern - include ::RuboCop::Cop::RangeHelp - - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def str_name(param0 = T.unsafe(nil)); end - def sym_name(param0 = T.unsafe(nil)); end - - private - - def attr_name(name_item); end - def message(style); end - def range_position(node); end -end - -RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - def on_def(node); end - def on_defs(node); end -end - -class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def dynamic_method_define(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def allowed_method_name?(method_name, prefix); end - def expected_name(method_name, prefix); end - def forbidden_prefixes; end - def message(method_name, new_name); end - def method_definition_macros(macro_name); end - def predicate_prefixes; end -end - -class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - - private - - def correct_node(corrector, node, offending_name, preferred_name); end - def correct_reassignment(corrector, node, offending_name, preferred_name); end - def message(node); end - def offense_range(resbody); end - def preferred_name(variable_name); end - def shadowed_variable_name?(node); end - def variable_name(node); end - def variable_name_matches?(node, name); end -end - -RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - - def on_arg(node); end - def on_blockarg(node); end - def on_cvasgn(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_optarg(node); end - def on_restarg(node); end - - private - - def message(style); end -end - -RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNumbering - - def on_arg(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defs(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_sym(node); end - - private - - def message(style); end -end - -RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::NegativeConditional - extend ::RuboCop::AST::NodePattern::Macros - - def empty_condition?(param0 = T.unsafe(nil)); end - def single_negative?(param0 = T.unsafe(nil)); end - - private - - def check_negative_conditional(node, message:, &block); end -end - -RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::NilMethods - include ::RuboCop::Cop::AllowedMethods - - private - - def nil_methods; end - def other_stdlib_methods; end -end - -class RuboCop::Cop::Offense - include ::Comparable - - def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end - - def <=>(other); end - def ==(other); end - def column; end - def column_length; end - def column_range; end - def cop_name; end - def correctable?; end - def corrected?; end - def corrected_with_todo?; end - def corrector; end - def disabled?; end - def eql?(other); end - def first_line; end - def hash; end - def highlighted_area; end - def last_column; end - def last_line; end - def line; end - def location; end - def message; end - def real_column; end - def severity; end - def source_line; end - def status; end - def to_s; end -end - -RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) - -class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct - def begin_pos; end - def begin_pos=(_); end - def column; end - def column=(_); end - def column_range; end - def end_pos; end - def end_pos=(_); end - def first_line; end - def last_column; end - def last_line; end - def length; end - def line; end - def line=(_); end - def size; end - def source_line; end - def source_line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::Cop::OnNormalIfUnless - def on_if(node); end -end - -class RuboCop::Cop::OrderedGemCorrector - extend ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::RangeHelp - - class << self - def comments_as_separators; end - def correct(processed_source, node, previous_declaration, comments_as_separators); end - def processed_source; end - - private - - def declaration_with_comment(node); end - def swap_range(corrector, range1, range2); end - end -end - -module RuboCop::Cop::OrderedGemNode - private - - def case_insensitive_out_of_order?(string_a, string_b); end - def consecutive_lines(previous, current); end - def find_gem_name(gem_node); end - def gem_canonical_name(name); end - def gem_name(declaration_node); end - def get_source_range(node, comments_as_separators); end - def register_offense(previous, current); end - def treat_comments_as_separators; end -end - -module RuboCop::Cop::Parentheses - private - - def parens_required?(node); end -end - -class RuboCop::Cop::ParenthesesCorrector - class << self - def correct(corrector, node); end - - private - - def next_char_is_question_mark?(node); end - def ternary_condition?(node); end - end -end - -module RuboCop::Cop::PercentArray - private - - def allowed_bracket_array?(node); end - def check_bracketed_array(node, literal_prefix); end - def check_percent_array(node); end - def comments_in_array?(node); end - def invalid_percent_array_contents?(_node); end - def invalid_percent_array_context?(node); end -end - -module RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::RangeHelp - - private - - def begin_source(node); end - def percent_literal?(node); end - def process(node, *types); end - def type(node); end -end - -class RuboCop::Cop::PercentLiteralCorrector - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - def initialize(config, preferred_delimiters); end - - def config; end - def correct(corrector, node, char); end - def preferred_delimiters; end - - private - - def autocorrect_multiline_words(node, escape, delimiters); end - def autocorrect_words(node, escape, delimiters); end - def delimiters_for(type); end - def end_content(source); end - def escape_words?(node); end - def first_line?(node, previous_line_num); end - def fix_escaped_content(word_node, escape, delimiters); end - def line_breaks(node, source, previous_line_num, base_line_num, node_indx); end - def new_contents(node, escape, delimiters); end - def process_lines(node, previous_line_num, base_line_num, source_in_lines); end - def process_multiline_words(node, escape, delimiters); end - def substitute_escaped_delimiters(content, delimiters); end - def wrap_contents(corrector, node, contents, char, delimiters); end -end - -module RuboCop::Cop::PrecedingFollowingAlignment - private - - def aligned_assignment?(range, line); end - def aligned_char?(range, line); end - def aligned_comment_lines; end - def aligned_identical?(range, line); end - def aligned_operator?(range, line); end - def aligned_token?(range, line); end - def aligned_with_adjacent_line?(range, predicate); end - def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end - def aligned_with_any_line_range?(line_ranges, range, &predicate); end - def aligned_with_append_operator?(range, line); end - def aligned_with_assignment(token, line_range); end - def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end - def aligned_with_operator?(range); end - def aligned_with_preceding_assignment(token); end - def aligned_with_something?(range); end - def aligned_with_subsequent_assignment(token); end - def aligned_words?(range, line); end - def allow_for_alignment?; end - def assignment_lines; end - def assignment_tokens; end - def relevant_assignment_lines(line_range); end - def remove_optarg_equals(asgn_tokens, processed_source); end -end - -class RuboCop::Cop::PreferredDelimiters - def initialize(type, config, preferred_delimiters); end - - def config; end - def delimiters; end - def type; end - - private - - def ensure_valid_preferred_delimiters; end - def preferred_delimiters; end - def preferred_delimiters_config; end -end - -RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::PunctuationCorrector - class << self - def add_space(corrector, token); end - def remove_space(corrector, space_before); end - def swap_comma(corrector, range); end - end -end - -module RuboCop::Cop::RangeHelp - private - - def column_offset_between(base_range, range); end - def contents_range(node); end - def directions(side); end - def effective_column(range); end - def final_pos(src, pos, increment, continuations, newlines, whitespace); end - def move_pos(src, pos, step, condition, regexp); end - def move_pos_str(src, pos, step, condition, needle); end - def range_between(start_pos, end_pos); end - def range_by_whole_lines(range, include_final_newline: T.unsafe(nil)); end - def range_with_surrounding_comma(range, side = T.unsafe(nil)); end - def range_with_surrounding_space(range:, side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil)); end - def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end -end - -RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) - -module RuboCop::Cop::RationalLiteral - extend ::RuboCop::AST::NodePattern::Macros - - def rational_literal?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Registry - include ::Enumerable - - def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - - def ==(other); end - def contains_cop_matching?(names); end - def cops; end - def department?(name); end - def department_missing?(badge, name); end - def departments; end - def dismiss(cop); end - def each(&block); end - def enabled(config, only = T.unsafe(nil), only_safe: T.unsafe(nil)); end - def enabled?(cop, config, only_safe); end - def enabled_pending_cop?(cop_cfg, config); end - def enlist(cop); end - def find_by_cop_name(cop_name); end - def freeze; end - def length; end - def names; end - def names_for_department(department); end - def options; end - def print_warning(name, path); end - def qualified_cop_name(name, path, warn: T.unsafe(nil)); end - def select(&block); end - def sort!; end - def to_h; end - def unqualified_cop_names; end - def with_department(department); end - def without_department(department); end - - private - - def clear_enrollment_queue; end - def initialize_copy(reg); end - def qualify_badge(badge); end - def registered?(badge); end - def resolve_badge(given_badge, real_badge, source_path); end - def with(cops); end - - class << self - def all; end - def global; end - def qualified_cop_name(name, origin); end - def reset!; end - def with_temporary_global(temp_global = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::RequireLibrary - extend ::RuboCop::AST::NodePattern::Macros - - def ensure_required(corrector, node, library_name); end - def on_send(node); end - def remove_subsequent_requires(corrector, node, library_name); end - def require_any_library?(param0 = T.unsafe(nil)); end - def require_library_name?(param0 = T.unsafe(nil), param1); end - - private - - def on_new_investigation; end -end - -class RuboCop::Cop::RequireLibraryCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - def correct(corrector, node, library_name); end - def require_statement(library_name); end - end -end - -module RuboCop::Cop::RescueNode - def on_new_investigation; end - - private - - def rescue_modifier?(node); end - def rescued_exceptions(resbody); end -end - -module RuboCop::Cop::SafeAssignment - extend ::RuboCop::AST::NodePattern::Macros - - def empty_condition?(param0 = T.unsafe(nil)); end - def safe_assignment?(param0 = T.unsafe(nil)); end - def setter_method?(param0 = T.unsafe(nil)); end - - private - - def safe_assignment_allowed?; end -end - -module RuboCop::Cop::Security; end - -class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base - def eval?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def json_load(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base - def marshal_load(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base - def on_send(node); end - def open?(param0 = T.unsafe(nil)); end - - private - - def composite_string?(node); end - def concatenated_string?(node); end - def interpolated_string?(node); end - def safe?(node); end - def safe_argument?(argument); end - def simple_string?(node); end -end - -RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def yaml_load(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Severity - include ::Comparable - - def initialize(name_or_code); end - - def <=>(other); end - def ==(other); end - def code; end - def hash; end - def level; end - def name; end - def to_s; end - - class << self - def name_from_code(code); end - end -end - -RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::SpaceAfterPunctuation - def on_new_investigation; end - - private - - def allowed_type?(token); end - def each_missing_space(tokens); end - def offset; end - def space_forbidden_before_rcurly?; end - def space_missing?(token1, token2); end - def space_required_before?(token); end -end - -RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SpaceBeforePunctuation - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def each_missing_space(tokens); end - def space_missing?(token1, token2); end - def space_required_after?(token); end - def space_required_after_lcurly?; end -end - -RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::SpaceCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::SurroundingSpace - - class << self - def add_space(processed_source, corrector, left_token, right_token); end - def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end - def processed_source; end - def remove_space(processed_source, corrector, left_token, right_token); end - end -end - -module RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::LineLengthHelp - - private - - def code_after(node); end - def comment_disables_cop?(comment); end - def first_line_comment(node); end - def length_in_modifier_form(node); end - def max_line_length; end - def modifier_fits_on_single_line?(node); end - def non_eligible_body?(body); end - def non_eligible_condition?(condition); end - def non_eligible_node?(node); end - def parenthesize?(node); end - def single_line_as_modifier?(node); end - def to_modifier_form(node); end -end - -module RuboCop::Cop::StringHelp - def on_regexp(node); end - def on_str(node); end - - private - - def inside_interpolation?(node); end -end - -class RuboCop::Cop::StringLiteralCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - def correct(corrector, node, style); end - end -end - -module RuboCop::Cop::StringLiteralsHelp - private - - def wrong_quotes?(src_or_node); end -end - -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def access_modifier_is_inlined?(node); end - def access_modifier_is_not_inlined?(node); end - def allow_modifiers_on_symbols?(node); end - def group_style?; end - def inline_style?; end - def message(range); end - def offense?(node); end -end - -RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - - private - - def accessor?(send_node); end - def autocorrect(corrector, node); end - def check(send_node); end - def class_send_elements(class_node); end - def group_accessors(node, accessors); end - def grouped_style?; end - def message(send_node); end - def preferred_accessors(node); end - def previous_line_comment?(node); end - def separate_accessors(node); end - def separated_style?; end - def sibling_accessors(send_node); end -end - -RuboCop::Cop::Style::AccessorGrouping::ACCESSOR_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def identifier(param0 = T.unsafe(nil)); end - def on_alias(node); end - def on_send(node); end - - private - - def add_offense_for_args(node, &block); end - def alias_keyword_possible?(node); end - def alias_method_possible?(node); end - def autocorrect(corrector, node); end - def bareword?(sym_node); end - def correct_alias_method_to_alias(corrector, send_node); end - def correct_alias_to_alias_method(corrector, node); end - def correct_alias_with_symbol_args(corrector, node); end - def lexical_scope_type(node); end - def scope_type(node); end -end - -RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_if(node); end - def on_or(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def correct_not(node, receiver, corrector); end - def correct_other(node, corrector); end - def correct_send(node, corrector); end - def correct_setter(node, corrector); end - def correctable_send?(node); end - def keep_operator_precedence(corrector, node); end - def message(node); end - def on_conditionals(node); end - def process_logical_operator(node); end - def whitespace_before_arg(node); end -end - -RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end - def on_def(node); end - def on_defs(node); end - def only_rest_arguments?(param0 = T.unsafe(nil), param1); end - def use_rest_arguments?(param0 = T.unsafe(nil)); end - - private - - def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end - def allow_only_rest_arguments?; end - def arguments_range(node); end - def extract_argument_names_from(args); end - def forwarding_method?(node, rest_arg, kwargs, block_arg); end - def register_offense_to_forwarding_method_arguments(forwarding_method); end - def register_offense_to_method_definition_arguments(method_definition); end -end - -RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def array_splat?(param0 = T.unsafe(nil)); end - def on_array(node); end - def on_if(node); end - def unless_array?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def join_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def allowed_non_ascii_chars; end - def first_non_ascii_chars(string); end - def first_offense_range(comment); end - def only_allowed_non_ascii_chars?(string); end -end - -RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def class_eval?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def message(node); end - def replacement_method(node); end -end - -RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def cleanup?(node); end -end - -RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - def on_str(node); end - - private - - def add_offense_for_wrong_style(node, good, bad); end - def check(node); end - def requires_bare_percent?(source); end - def requires_percent_q?(source); end -end - -RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base - def on_preexe(node); end -end - -RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def after_class(class_node); end - def after_module(class_node); end - def after_sclass(class_node); end - def on_class(class_node); end - def on_module(class_node); end - def on_new_investigation; end - def on_sclass(class_node); end - - private - - def correct_reader(corrector, macro, node, range); end - def correct_writer(corrector, macro, node, range); end - def find_bisection(macros); end - def find_macros(class_def); end - def register_offense(attr); end -end - -RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BisectedAttrAccessor::Macro - include ::RuboCop::Cop::VisibilityHelp - - def initialize(node); end - - def all_bisected?; end - def attr_names; end - def attrs; end - def bisect(*names); end - def bisected_names; end - def bisection; end - def node; end - def reader?; end - def rest; end - def visibility; end - def writer?; end - - class << self - def macro?(node); end - end -end - -class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def eq_end_part(comment, expr); end - def parts(comment); end -end - -RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::IgnoredMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_send(node); end - - private - - def array_or_range?(node); end - def autocorrect(corrector, node); end - def begin_required?(block_node); end - def braces_for_chaining_message(node); end - def braces_for_chaining_style?(node); end - def braces_required_message(node); end - def braces_required_method?(method_name); end - def braces_required_methods; end - def braces_style?(node); end - def conditional?(node); end - def correction_would_break_code?(node); end - def end_of_chain(node); end - def functional_block?(node); end - def functional_method?(method_name); end - def get_blocks(node, &block); end - def line_count_based_block_style?(node); end - def line_count_based_message(node); end - def message(node); end - def move_comment_before_block(corrector, comment, block_node, closing_brace); end - def procedural_method?(method_name); end - def procedural_oneliners_may_have_braces?; end - def proper_block_style?(node); end - def replace_braces_with_do_end(corrector, loc); end - def replace_do_end_with_braces(corrector, node); end - def return_value_of_scope?(node); end - def return_value_used?(node); end - def semantic_block_style?(node); end - def semantic_message(node); end - def special_method?(method_name); end - def special_method_proper_block_style?(node); end - def whitespace_after?(range, length = T.unsafe(nil)); end - def whitespace_before?(range); end -end - -RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CaseCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, cop, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def extract_branches(case_node); end - def extract_tail_branches(node); end - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def case_equality?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def const?(node); end - def replacement(lhs, rhs); end -end - -RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def branch_conditions(node); end - def class_reference?(node); end - def collect_conditions(node, target, conditions); end - def condition_from_binary_op(lhs, rhs, target); end - def condition_from_equality_node(node, target); end - def condition_from_include_or_cover_node(node, target); end - def condition_from_match_node(node, target); end - def condition_from_send_node(node, target); end - def const_reference?(node); end - def correction_range(node); end - def deparenthesize(node); end - def find_target(node); end - def find_target_in_equality_node(node); end - def find_target_in_include_or_cover_node(node); end - def find_target_in_match_node(node); end - def find_target_in_send_node(node); end - def regexp_with_named_captures?(node); end - def regexp_with_working_captures?(node); end - def should_check?(node); end -end - -RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def correct_style_detected; end - def offense?(node); end - def opposite_style_detected; end -end - -RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def add_trailing_end(corrector, node, padding); end - def autocorrect(corrector, node); end - def check_compact_style(node, body); end - def check_nested_style(node); end - def check_style(node, body); end - def compact_definition(corrector, node); end - def compact_identifier_name(node); end - def compact_node(corrector, node); end - def compact_node_name?(node); end - def compact_replacement(node); end - def configured_indentation_width; end - def indent_width; end - def leading_spaces(node); end - def needs_compacting?(body); end - def nest_definition(corrector, node); end - def nest_or_compact(corrector, node); end - def remove_end(corrector, body); end - def replace_namespace_keyword(corrector, node); end - def split_on_double_colon(corrector, node, padding); end - def unindent(corrector, node); end -end - -RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def message(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def class_comparison_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def class_name(class_node, node); end - def offense_range(receiver_node, node); end -end - -RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def check_defs(name, node); end -end - -RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_defs(node); end - def on_sclass(node); end - - private - - def all_methods_public?(sclass_node); end - def autocorrect_sclass(node, corrector); end - def def_nodes(sclass_node); end - def def_self_style?; end - def extract_def_from_sclass(def_node, sclass_node); end - def indentation_diff(node1, node2); end - def sclass_only_has_methods?(node); end -end - -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base - def on_cvasgn(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def reject_method?(param0 = T.unsafe(nil)); end - def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - def select_method?(param0 = T.unsafe(nil)); end - - private - - def good_method_name(method_name); end - def offense_range(node); end - def range(begin_pos_node, end_pos_node); end -end - -RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_send(node); end - - private - - def check_method_node(node); end - def implicit_block?(node); end - def message(node); end - def methods_accepting_symbol; end -end - -RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def java_type_node?(param0 = T.unsafe(nil)); end - def on_send(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_defs(node); end -end - -RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - def on_block(node); end - def on_for(node); end - - private - - def collection_looping_method?(node); end - def same_collection_looping?(node, sibling); end -end - -RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_xstr(node); end - - private - - def allow_inner_backticks?; end - def allowed_backtick_literal?(node); end - def allowed_percent_x_literal?(node); end - def autocorrect(corrector, node); end - def backtick_literal?(node); end - def check_backtick_literal(node, message); end - def check_percent_x_literal(node, message); end - def command_delimiter; end - def contains_backtick?(node); end - def contains_disallowed_backtick?(node); end - def default_delimiter; end - def node_body(node); end - def preferred_delimiter; end - def preferred_delimiters_config; end -end - -RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def annotation_range(annotation); end - def correct_offense(corrector, range, keyword); end - def first_comment_line?(comments, index); end - def inline_comment?(comment); end - def keywords; end - def register_offense(annotation); end - def requires_colon?; end -end - -RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def offensive?(comment); end - def register_offense(comment, matched_keyword); end - def source_line(comment); end -end - -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::ConditionalAssignmentHelper - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def assignment_type?(param0 = T.unsafe(nil)); end - def candidate_condition?(param0 = T.unsafe(nil)); end - def on_and_asgn(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - - private - - def allowed_single_line?(branches); end - def allowed_statements?(branches); end - def allowed_ternary?(assignment); end - def assignment_node(node); end - def assignment_types_match?(*nodes); end - def autocorrect(corrector, node); end - def candidate_node?(node); end - def check_assignment_to_condition(node); end - def check_node(node, branches); end - def correction_exceeds_line_limit?(node, branches); end - def include_ternary?; end - def indentation_width; end - def lhs_all_match?(branches); end - def line_length_cop_enabled?; end - def longest_line(node, assignment); end - def longest_line_exceeds_line_limit?(node, assignment); end - def max_line_length; end - def move_assignment_inside_condition(corrector, node); end - def move_assignment_outside_condition(corrector, node); end - def single_line_conditions_only?; end - def ternary_condition?(node); end -end - -RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::INDENTATION_WIDTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ConditionalAssignment::WIDTH = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::AST::NodePattern::Macros - - def end_with_eq?(sym); end - def expand_elses(branch); end - def expand_when_branches(when_branches); end - def indent(cop, source); end - def lhs(node); end - def tail(branch); end - - private - - def assignment_rhs_exist?(node); end - def expand_elsif(node, elsif_branches = T.unsafe(nil)); end - def lhs_for_casgn(node); end - def lhs_for_send(node); end - def setter_method?(method_name); end -end - -RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::ConditionalCorrectorHelper - def assignment(node); end - def correct_branches(corrector, branches); end - def correct_if_branches(corrector, cop, node); end - def remove_whitespace_in_branches(corrector, branch, condition, column); end - def replace_branch_assignment(corrector, branch); end - def white_space_range(node, column); end -end - -class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base - def on_casgn(node); end - def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end - - private - - def class_or_module_scope?(node); end - def ignore_modules?; end - def match_name?(name, constant_name); end - def message(node); end - def module?(node); end - def visibility_declaration?(node); end -end - -RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect_notice; end - def encoding_token?(processed_source, token_index); end - def insert_notice_before(processed_source); end - def notice; end - def notice_found?(processed_source); end - def offense_range; end - def shebang_token?(processed_source, token_index); end - def verify_autocorrect_notice!; end -end - -RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def date_time?(param0 = T.unsafe(nil)); end - def historic_date?(param0 = T.unsafe(nil)); end - def on_send(node); end - def to_datetime?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def disallow_coercion?; end -end - -RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def dir_replacement?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def file_keyword?(node); end -end - -RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allowed_cops; end - def any_cops_allowed?; end - def directive_cops(comment); end - def register_offense(comment, directive_cops, disallowed_cops); end -end - -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def comment_block_docs?(arg_node); end - def comment_regexp(arg_node); end - def heredoc_comment_blocks(heredoc_body); end - def inline_comment_docs?(node); end - def interpolated?(arg_node); end - def merge_adjacent_comments(line, index, hash); end - def preceding_comment_blocks(node); end - def source_to_regexp(source); end -end - -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::RangeHelp - - def constant_definition?(param0 = T.unsafe(nil)); end - def constant_visibility_declaration?(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_module(node); end - def outer_module(param0); end - - private - - def allowed_constants; end - def check(node, body); end - def compact_namespace?(node); end - def constant_allowed?(node); end - def constant_declaration?(node); end - def identifier(node); end - def macro_only?(body); end - def namespace?(node); end - def nodoc(node); end - def nodoc?(comment, require_all: T.unsafe(nil)); end - def nodoc_comment?(node, require_all: T.unsafe(nil)); end - def nodoc_self_or_outer_module?(node); end - def qualify_const(node); end -end - -RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::DefNode - - def module_function_node?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def check(node); end - def require_for_non_public_methods?; end -end - -RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def double_negative?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_in_returns?(node); end - def end_of_method_definition?(node); end - def find_def_node_from_ascendant(node); end - def find_last_child(node); end -end - -RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def offending_each_range(param0 = T.unsafe(nil)); end - def on_block(node); end -end - -RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def each_with_object_candidate?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def accumulator_param_assigned_to?(body, args); end - def autocorrect(corrector, node, return_value); end - def first_argument_returned?(args, return_value); end - def return_value(body); end - def return_value_occupies_whole_line?(node); end - def simple_method_arg?(method_arg); end - def whole_line_expression(node); end -end - -RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(case_node); end - - private - - def autocorrect(corrector, case_node); end - def correct_case_when(corrector, case_node, when_nodes); end - def correct_when_conditions(corrector, when_nodes); end - def keep_first_when_comment(case_range, corrector); end - def replace_then_with_line_break(corrector, conditions, when_node); end -end - -RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_normal_if_unless(node); end - - private - - def autocorrect(corrector, node); end - def autocorrect_forbidden?(type); end - def base_node(node); end - def check(node); end - def comment_in_else?(loc); end - def empty_check(node); end - def empty_style?; end - def missing_else_style; end - def nil_check(node); end - def nil_style?; end -end - -RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def array_node(param0 = T.unsafe(nil)); end - def array_with_block(param0 = T.unsafe(nil)); end - def hash_node(param0 = T.unsafe(nil)); end - def hash_with_block(param0 = T.unsafe(nil)); end - def on_send(node); end - def str_node(param0 = T.unsafe(nil)); end - - private - - def correction(node); end - def enforce_double_quotes?; end - def first_argument_unparenthesized?(node); end - def frozen_strings?; end - def offense_array_node?(node); end - def offense_hash_node?(node); end - def offense_message(node); end - def preferred_string_literal; end - def replacement_range(node); end - def string_literals_config; end -end - -RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def compact?(node); end - def compact_style?; end - def correct_style?(node); end - def corrected(node); end - def expanded?(node); end - def expanded_style?; end - def joint(node); end - def message(_range); end -end - -RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def comments; end - def offense?(comment); end - def register_offense(line_number, comment); end -end - -RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_postexe(node); end -end - -RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def arguments(node, missing = T.unsafe(nil)); end - def correct_to_multiline(corrector, node); end - def handle_allow_style(node); end - def handle_disallow_style(node); end -end - -RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - def on_send(node); end - def valid_eval_receiver?(param0 = T.unsafe(nil)); end - - private - - def add_offense_for_different_line(node, line_node, line_diff); end - def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - def add_offense_for_missing_line(node, code); end - def add_offense_for_missing_location(node, code); end - def add_offense_for_same_line(node, line_node); end - def check_file(node, file_node); end - def check_line(node, code); end - def check_location(node, code); end - def expected_line(sign, line_diff); end - def file_and_line(node); end - def line_difference(line_node, code); end - def missing_line(node, code); end - def register_offense(node, &block); end - def special_file_keyword?(node); end - def special_line_keyword?(node); end - def string_first_line(str_node); end - def with_binding?(node); end - def with_lineno?(node); end -end - -RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def even_odd_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def replacement_method(arg, method); end -end - -RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def file_expand_path(param0 = T.unsafe(nil)); end - def on_send(node); end - def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end - def pathname_parent_expand_path(param0 = T.unsafe(nil)); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def autocorrect_expand_path(corrector, current_path, default_dir); end - def depth(current_path); end - def inspect_offense_for_expand_path(node, current_path, default_dir); end - def parent_path(current_path); end - def remove_parent_method(corrector, default_dir); end - def strip_surrounded_quotes!(path_string); end - def unrecommended_argument?(default_dir); end -end - -RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_yield(node); end - def yielding_block?(param0 = T.unsafe(nil)); end - - private - - def add_block_argument(node, corrector, block_name); end - def block_body_range(block_node, send_node); end - def call_like?(node); end - def correct_call_node(node, corrector, block_name); end - def empty_arguments?(node); end - def extract_block_name(def_node); end - def insert_argument(node, corrector, block_name); end - def yielding_arguments?(block_args, yield_args); end -end - -RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def on_float(node); end - - private - - def engineering?(node); end - def integral(node); end - def message(_node); end - def offense?(node); end - def scientific?(node); end -end - -RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_read?(param0 = T.unsafe(nil)); end - def file_open?(param0 = T.unsafe(nil)); end - def on_send(node); end - def send_read?(param0 = T.unsafe(nil)); end - - private - - def evidence(node); end - def file_open_read?(node); end - def read_method(mode); end - def read_node?(node, block_pass); end -end - -RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_write?(param0 = T.unsafe(nil)); end - def evidence(node); end - def file_open?(param0 = T.unsafe(nil)); end - def on_send(node); end - def send_write?(param0 = T.unsafe(nil)); end - - private - - def file_open_write?(node); end - def heredoc?(write_node); end - def heredoc_range(first_argument); end - def replacement(mode, filename, content, write_node); end - def write_method(mode); end -end - -RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def any_coerce?(param0 = T.unsafe(nil)); end - def both_coerce?(param0 = T.unsafe(nil)); end - def left_coerce?(param0 = T.unsafe(nil)); end - def on_send(node); end - def right_coerce?(param0 = T.unsafe(nil)); end - - private - - def add_to_f_method(corrector, node); end - def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end - def extract_receiver_source(node); end - def message(_node); end - def offense_condition?(node); end - def remove_to_f_method(corrector, send_node); end -end - -RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_for(node); end - - private - - def suspect_enumerable?(node); end -end - -RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def formatter(param0 = T.unsafe(nil)); end - def on_send(node); end - def variable_argument?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def autocorrect_from_percent(corrector, node); end - def autocorrect_to_percent(corrector, node); end - def format_single_parameter(arg); end - def message(detected_style); end - def method_name(style_name); end -end - -RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - - def format_string_in_typical_context?(param0 = T.unsafe(nil)); end - def on_str(node); end - - private - - def allowed_unannotated?(detections); end - def collect_detections(node); end - def format_string_token?(node); end - def max_unannotated_placeholders_allowed; end - def message(detected_style); end - def message_text(style); end - def str_contents(source_map); end - def token_ranges(contents); end - def tokens(str_node, &block); end - def unannotated_format?(node, detected_style); end - def use_ignored_method?(node); end -end - -class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def disabled_offense(processed_source); end - def enable_comment(corrector); end - def ensure_comment(processed_source); end - def ensure_enabled_comment(processed_source); end - def ensure_no_comment(processed_source); end - def following_comment; end - def frozen_string_literal_comment(processed_source); end - def insert_comment(corrector); end - def last_special_comment(processed_source); end - def line_range(line); end - def missing_offense(processed_source); end - def missing_true_offense(processed_source); end - def preceding_comment; end - def remove_comment(corrector, node); end - def unnecessary_comment_offense(processed_source); end -end - -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end - def on_const(node); end - - private - - def gvar_name(const_name); end - def message(const_name); end -end - -RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base - def allowed_var?(global_var); end - def check(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def user_vars; end -end - -RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - - def on_def(node); end - def on_defs(node); end - def on_if(node); end - - private - - def accepted_form?(node, ending: T.unsafe(nil)); end - def accepted_if?(node, ending); end - def check_ending_if(node); end - def guard_clause_source(guard_clause); end - def opposite_keyword(node); end - def register_offense(node, scope_exiting_keyword, conditional_keyword); end - def too_long_for_single_line?(node, example); end -end - -RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def braces_style?; end - def check_braces(node); end - def check_no_braces(node); end - def containing_array(hash_node); end - def explicit_array?(array); end - def last_array_item?(array, node); end - def remove_last_element_trailing_comma(corrector, node); end -end - -class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def hash_from_array?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_splat_argument?; end - def args_to_hash(args); end - def multi_argument(node); end - def register_offense_for_hash(node, hash_argument); end - def register_offense_for_zip_method(node, zip_method); end - def requires_parens?(node); end - def single_argument(node); end - def use_zip_method_without_argument?(first_argument); end -end - -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - def kv_each(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def allowed_receiver?(receiver); end - def allowed_receivers; end - def check_argument(variable); end - def correct_args(node, corrector); end - def correct_implicit(node, corrector, method_name); end - def correct_key_value_each(node, corrector); end - def kv_range(outer_node); end - def register_kv_offense(node); end - def used?(arg); end -end - -RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - def bad_method?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def except_key(node); end - def offense_range(node); end - def safe_to_register_offense?(block, except_key); end - def semantically_except_method?(send, block); end -end - -RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base - def hash_like_case?(param0 = T.unsafe(nil)); end - def on_case(node); end - - private - - def min_branches_count; end - def nodes_of_same_type?(nodes); end -end - -RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::HashShorthandSyntax - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def alternative_style; end - def hash_rockets_check(pairs); end - def no_mixed_keys_check(pairs); end - def on_hash(node); end - def ruby19_check(pairs); end - def ruby19_no_mixed_keys_check(pairs); end - - private - - def acceptable_19_syntax_symbol?(sym_name); end - def argument_without_space?(node); end - def autocorrect(corrector, node); end - def autocorrect_hash_rockets(corrector, pair_node); end - def autocorrect_no_mixed_keys(corrector, pair_node); end - def autocorrect_ruby19(corrector, pair_node); end - def check(pairs, delim, msg); end - def force_hash_rockets?(pairs); end - def range_for_autocorrect_ruby19(pair_node); end - def sym_indices?(pairs); end - def word_symbol_pair?(pair); end -end - -RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - def extract_captures(match); end - def new_method_name; end -end - -class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - def extract_captures(match); end - def new_method_name; end -end - -class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_case_match(node); end - def on_if(node); end - - private - - def check_branches(node, branches); end - def check_expressions(node, expressions, insert_position); end - def duplicated_expressions?(node, expressions); end - def expand_elses(branch); end - def head(node); end - def message(node); end - def tail(node); end -end - -RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, cop, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def extract_tail_branches(node); end - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def allow_if_modifier?; end - def allow_if_modifier_in_else_branch?(else_branch); end - def autocorrect(corrector, node); end - def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - def correct_to_elsif_from_modifier_form(corrector, node); end - def find_end_range(node); end - def if_condition_range(node, condition); end - def then?(node); end -end - -RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::IgnoredPattern - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def another_statement_on_same_line?(node); end - def autocorrect(corrector, node); end - def extract_heredoc_from(last_argument); end - def ignored_patterns; end - def line_length_enabled_at_line?(line); end - def named_capture_in_condition?(node); end - def non_eligible_node?(node); end - def non_simple_if_unless?(node); end - def remove_heredoc(corrector, heredoc); end - def to_normal_form(node, indentation); end - def to_normal_form_with_heredoc(node, indentation, heredoc); end - def too_long_due_to_modifier?(node); end - def too_long_line_based_on_allow_uri?(line); end - def too_long_line_based_on_config?(range, line); end - def too_long_line_based_on_ignore_cop_directives?(range, line); end - def too_long_single_line?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end -end - -RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def double_negative?(param0 = T.unsafe(nil)); end - def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - def on_if(node); end - - private - - def assume_boolean_value?(condition); end - def message(node, keyword); end - def offense_range_with_keyword(node, condition); end - def opposite_condition?(node); end - def replacement_condition(node, condition); end - def require_parentheses?(condition); end - def return_boolean_value?(condition); end -end - -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def autocorrect(node); end - def build_else_branch(second_condition); end - def correct_elsif(node); end -end - -RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base - def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_in_pattern(node); end - - private - - def alternative_pattern_source(pattern); end -end - -RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def after_leaving_scope(scope, _variable_table); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def assigned_before_loop?(var, range); end - def assigned_inside_loop?(var, range); end - def autocorrect(corrector, node); end - def configured_indent; end - def modifier_replacement(node); end - def non_modifier_range(node); end - def referenced_after_loop?(var, range); end - def replace_begin_end_with_modifier(corrector, node); end - def replace_source(corrector, range, replacement); end - def while_or_until(node); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base - def on_new_investigation; end -end - -RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def inverse_block?(param0 = T.unsafe(nil)); end - def inverse_candidate?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_send(node); end - - private - - def camel_case_constant?(node); end - def correct_inverse_block(corrector, node); end - def correct_inverse_method(corrector, node); end - def correct_inverse_selector(block, corrector); end - def dot_range(loc); end - def end_parentheses(node, method_call); end - def inverse_blocks; end - def inverse_methods; end - def message(method, inverse); end - def negated?(node); end - def not_to_receiver(node, method_call); end - def possible_class_hierarchy_check?(lhs, rhs, method); end - def remove_end_parenthesis(corrector, node, method, method_call); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - - def correct_style_detected; end - def offense?(node); end - def opposite_style_detected; end - - private - - def allowed_addresses; end - def could_be_ip?(str); end - def starts_with_hex_or_colon?(str); end - def too_long?(str); end -end - -RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_kwoptarg(node); end - - private - - def append_newline_to_last_kwoptarg(arguments, corrector); end - def remove_kwargs(kwarg_nodes, corrector); end -end - -RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - - private - - def arguments_with_whitespace(node); end - def autocorrect_method_to_literal(corrector, node); end - def lambda_arg_string(args); end - def message(node, selector); end - def message_line_modifier(node); end - def offending_selector?(node, selector); end -end - -RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def on_send(node); end - - private - - def explicit_style?; end - def implicit_style?; end - def message(_node); end - def offense?(node); end -end - -RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, operator_range); end - def check_token_set(index); end - def eligible_next_successor?(next_successor); end - def eligible_operator?(operator); end - def eligible_predecessor?(predecessor); end - def eligible_successor?(successor); end - def eligible_token_set?(predecessor, operator, successor); end - def standard_string_literal?(token); end - def token_after_last_string(successor, base_index); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def map_to_h?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def autocorrect(corrector, to_h, map); end -end - -RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::IgnoredMethods - include ::RuboCop::Cop::IgnoredPattern - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - def on_super(node); end - def on_yield(node); end - - private - - def args_begin(node); end - def args_end(node); end - def args_parenthesized?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - private - - def allowed_camel_case_method_call?(node); end - def allowed_chained_call_with_parentheses?(node); end - def allowed_multiline_call_with_parentheses?(node); end - def allowed_string_interpolation_method_call?(node); end - def ambigious_literal?(node); end - def assigned_before?(node, target); end - def auto_correct(corrector, node); end - def call_as_argument_or_chain?(node); end - def call_in_literals?(node); end - def call_in_logical_operators?(node); end - def call_in_optional_arguments?(node); end - def call_in_single_line_inheritance?(node); end - def call_with_ambiguous_arguments?(node); end - def call_with_braced_block?(node); end - def hash_literal?(node); end - def hash_literal_in_arguments?(node); end - def inside_endless_method_def?(node); end - def inside_string_interpolation?(node); end - def legitimate_call_with_parentheses?(node); end - def logical_operator?(node); end - def offense_range(node); end - def omit_parentheses(node); end - def parentheses_at_the_end_of_multiline_call?(node); end - def regexp_slash_literal?(node); end - def require_parentheses_for_hash_value_omission?(node); end - def splat?(node); end - def super_call_without_arguments?(node); end - def syntax_like_method_call?(node); end - def ternary_if?(node); end - def unary_literal?(node); end -end - -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) - -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - private - - def eligible_for_parentheses_omission?(node); end - def ignored_macro?(node); end - def included_macros_list; end - def require_parentheses(node); end -end - -RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def any_assignment?(node); end - def default_argument?(node); end - def ineligible_node?(node); end - def offense_range(node); end - def register_offense(node); end - def same_name_assignment?(node); end - def variable_in_mass_assignment?(variable_name, node); end -end - -RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_block(node); end - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def anonymous_block_arg?(node); end - def arguments_without_parentheses?(node); end - def correct_arguments(arg_node, corrector); end - def forced_parentheses?(node); end - def missing_parentheses(node); end - def require_parentheses?(args); end - def unwanted_parentheses(args); end -end - -RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def min_max_candidate(param0 = T.unsafe(nil)); end - def on_array(node); end - def on_return(node); end - - private - - def argument_range(node); end - def message(offender, receiver); end - def offending_range(node); end -end - -RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def on_case(node); end - def on_case_match(node); end - def on_normal_if_unless(node); end - - private - - def case_style?; end - def check(node); end - def empty_else_config; end - def empty_else_cop_enabled?; end - def empty_else_style; end - def if_style?; end - def message_template; end - def unless_else_config; end - def unless_else_cop_enabled?; end -end - -RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def implements_respond_to_missing?(node); end -end - -RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def check(send_node); end - def check_grouped_style(send_node); end - def check_separated_style(send_node); end - def group_mixins(node, mixins); end - def grouped_style?; end - def range_to_remove_for_subsequent_mixin(mixins, node); end - def separate_mixins(node); end - def separated_style?; end - def sibling_mixins(send_node); end -end - -RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base - def in_top_level_scope?(param0 = T.unsafe(nil)); end - def include_statement(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def extend_self_node?(param0 = T.unsafe(nil)); end - def module_function_node?(param0 = T.unsafe(nil)); end - def on_module(node); end - def private_directive?(param0 = T.unsafe(nil)); end - - private - - def check_extend_self(nodes); end - def check_forbidden(nodes); end - def check_module_function(nodes); end - def each_wrong_style(nodes, &block); end - def message(_range); end -end - -RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_block(node); end -end - -RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def configured_indentation_width; end - def indented_body(body, node); end - def to_normal_if(node); end -end - -RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def non_modifier_then?(node); end -end - -RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_in_pattern(node); end - - private - - def require_then?(in_pattern_node); end -end - -RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def message(_node); end - def on_or_asgn(node); end - - private - - def bad_rhs?(rhs); end - def keyword_autocorrect(node, corrector); end - def keyword_begin_str(node, node_buf); end - def keyword_end_str(node, node_buf); end -end - -RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def closing_line(node); end - def correction_exceeds_max_line_length?(node); end - def definition_width(node); end - def indentation_width(node); end - def last_line_source_of_arguments(arguments); end - def max_line_length; end - def opening_line(node); end -end - -RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def offense?(node); end -end - -RuboCop::Cop::Style::MultilineTernaryOperator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_when(node); end - - private - - def accept_node_type?(node); end - def require_then?(when_node); end -end - -RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - def on_or(node); end - def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - def simple_double_comparison?(param0 = T.unsafe(nil)); end - - private - - def allow_method_comparison?; end - def comparison?(node); end - def nested_comparison?(node); end - def nested_variable_comparison?(node); end - def reset_comparison; end - def root_of_or_node(or_node); end - def switch_comparison?(node); end - def variable_name(node); end - def variables_in_node(node); end - def variables_in_simple_node(node); end -end - -RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_casgn(node); end - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end - def splat_value(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def check(value); end - def correct_splat_expansion(corrector, expr, splat_value); end - def frozen_regexp_or_range_literals?(node); end - def immutable_literal?(node); end - def mutable_literal?(value); end - def on_assignment(value); end - def requires_parentheses?(node); end - def shareable_constant_value?(node); end - def strict_check(value); end -end - -RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - private - - def magic_comment_in_scope(node); end - def processed_source_till_node(node); end - def recent_shareable_value?(node); end - def shareable_constant_value_enabled?(value); end - - class << self - def magic_comment_in_scope(node); end - def recent_shareable_value?(node); end - end -end - -class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def correct_style?(node); end - def message(node); end -end - -class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def double_negation?(param0 = T.unsafe(nil)); end - def on_if(node); end - def on_new_investigation; end - - private - - def correct_negated_condition(corrector, node); end - def corrected_ancestor?(node); end - def else_range(node); end - def if_else?(node); end - def if_range(node); end - def negated_condition?(node); end - def swap_branches(corrector, node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def correct_style?(node); end - def message(node); end -end - -class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def add_parentheses_to_method_arguments(send_node); end - def autocorrect(corrector, node); end - def check(node); end - def left_hand_operand(node, operator); end - def modifier?(node); end - def new_expression(inner_node); end - def replacement_operator(keyword); end - def requires_parens?(node); end - def right_hand_operand(node, left_hand_keyword); end -end - -RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def allowed?(send_node); end - def allowed_omission?(send_node); end - def autocorrect(corrector, nested); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def if_node(node); end - def remove_parentheses(source); end -end - -RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_for(node); end - def on_new_investigation; end - def on_until(node); end - def on_while(node); end - - private - - def actual_indent(lines, buffer); end - def allowed_modifier_if?(node); end - def autocorrect_block(corrector, node); end - def autocorrect_modifier(corrector, node); end - def check(node); end - def cond_range(node, cond); end - def end_followed_by_whitespace_only?(source_buffer, end_pos); end - def end_range(node); end - def ends_with_condition?(body); end - def exit_body_type?(node); end - def heredoc_lines(node); end - def if_else_children?(node); end - def if_without_else?(node); end - def offense_location(offense_node); end - def offense_node(body); end - def reindent(lines, node, corrector); end - def reindent_line(corrector, lineno, delta, buffer); end - def reindentable_lines(node); end - def simple_if_without_break?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def nil_check?(param0 = T.unsafe(nil)); end - def nil_comparison?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def message(_node); end - def prefer_comparison?; end - def style_check?(node, &block); end -end - -RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def nil_return?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def nil_check?(param0 = T.unsafe(nil)); end - def not_and_nil_check?(param0 = T.unsafe(nil)); end - def not_equal_to_nil?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def unless_check?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def autocorrect_comparison(corrector, node); end - def autocorrect_non_nil(corrector, node, inner_node); end - def autocorrect_unless_nil(corrector, node, receiver); end - def include_semantic_changes?; end - def message(node); end - def nil_comparison_style; end - def register_offense?(node); end - def unless_and_nil_check?(send_node); end -end - -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def correct_opposite_method(corrector, range, child); end - def correct_with_parens(corrector, range, node); end - def correct_without_parens(corrector, range); end - def opposite_method?(child); end - def requires_parens?(child); end -end - -RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - - def on_numblock(node); end -end - -RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - def max=(value); end - def on_numblock(node); end - - private - - def max_count; end -end - -RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - def on_int(node); end - - private - - def format_binary(source); end - def format_decimal(source); end - def format_hex(source); end - def format_octal(source); end - def format_octal_zero_only(source); end - def hex_bin_dec_literal_type(literal); end - def literal_type(node); end - def message(node); end - def octal_literal_type(literal); end - def octal_zero_only?; end -end - -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - def min_digits=(value); end - def on_float(node); end - def on_int(node); end - - private - - def allowed_numbers; end - def check(node); end - def format_int_part(int_part); end - def format_number(node); end - def min_digits; end - def register_offense(node, &_block); end - def short_group_regex; end -end - -RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def comparison(param0 = T.unsafe(nil)); end - def inverted_comparison(param0 = T.unsafe(nil)); end - def on_send(node); end - def predicate(param0 = T.unsafe(nil)); end - - private - - def check(node); end - def invert; end - def parenthesized_source(node); end - def replacement(numeric, operation); end - def require_parentheses?(node); end -end - -RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def always_multiline?; end - def autocorrect(corrector, node); end - def cannot_replace_to_ternary?(node); end - def expr_replacement(node); end - def indentation_width; end - def keyword_with_changed_precedence?(node); end - def message(node); end - def method_call_with_changed_precedence?(node); end - def requires_parentheses?(node); end - def ternary_correction(node); end - def ternary_replacement(node); end -end - -RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base - def on_const(node); end - def uses_open_struct?(param0 = T.unsafe(nil)); end - - private - - def custom_class_or_module_definition?(node); end -end - -RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base - def on_args(node); end - def option_hash(param0 = T.unsafe(nil)); end - - private - - def allowlist; end - def super_used?(node); end - def suspicious_name?(arg_name); end -end - -RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base - def on_def(node); end - - private - - def argument_positions(arguments); end - def each_misplaced_optional_arg(arguments); end -end - -RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def on_def(node); end - def on_defs(node); end - - private - - def format_message(argument); end -end - -RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def ternary_assignment?(param0 = T.unsafe(nil)); end - def unless_assignment?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def take_variable_and_default_from_ternary(node); end - def take_variable_and_default_from_unless(node); end -end - -RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - def implicit_self_getter?(param0 = T.unsafe(nil)); end - def on_masgn(node); end - - private - - def add_self_to_getters(right_elements); end - def allowed_lhs?(node); end - def allowed_masign?(lhs_elements, rhs_elements); end - def allowed_rhs?(node); end - def assignment_corrector(node, order); end - def autocorrect(corrector, node); end - def find_valid_order(left_elements, right_elements); end - def modifier_statement?(node); end - def return_of_method_call?(node); end -end - -class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter - include ::TSort - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(assignments); end - - def accesses?(rhs, lhs); end - def dependency?(lhs, rhs); end - def matching_calls(param0, param1, param2); end - def tsort_each_child(assignment); end - def tsort_each_node(&block); end - def uses_var?(param0, param1); end - def var_name(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - include ::RuboCop::Cop::Alignment - - def initialize(node, config, new_elements); end - - def config; end - def correction; end - def correction_range; end - def node; end - - protected - - def assignment; end - - private - - def cop_config; end - def extract_sources(node); end - def source(node); end -end - -RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - def correction; end - def correction_range; end - - private - - def modifier_range(node); end -end - -class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - def correction; end - def correction_range; end - - private - - def begin_correction(rescue_result); end - def def_correction(rescue_result); end -end - -class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::Parentheses - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def control_op_condition(param0 = T.unsafe(nil)); end - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def allow_multiline_conditions?; end - def message(node); end - def modifier_op?(node); end - def parens_allowed?(node); end - def process_control_op(node); end - def semicolon_separated_expressions?(first_exp, rest_exps); end -end - -class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_dstr(node); end - def on_regexp(node); end - def on_str(node); end - def on_sym(node); end - def on_xstr(node); end - - private - - def contains_delimiter?(node, delimiters); end - def contains_preferred_delimiter?(node, type); end - def include_same_character_as_used_for_delimiter?(node, type); end - def matchpairs(begin_delimiter); end - def message(type); end - def on_percent_literal(node); end - def preferred_delimiters_for(type); end - def string_source(node); end - def uses_preferred_delimiter?(node, type); end -end - -class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_str(node); end - - private - - def correct_literal_style?(node); end - def corrected(src); end - def message(_range); end - def on_percent_literal(node); end -end - -RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_back_ref(node); end - def on_gvar(node); end - def on_nth_ref(node); end - - private - - def derived_from_braceless_interpolation?(node); end - def format_message(node:, preferred_expression:); end - def on_back_ref_or_gvar_or_nth_ref(node); end - def original_expression_of(node); end - def preferred_expression_to(node); end -end - -RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def message(method_name); end - def offending_selector?(method_name); end - def proper_method_name(method_name); end -end - -RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def proc_new?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_sym(node); end - - private - - def alternative_style; end - def autocorrect(corrector, node); end - def correct_quotes(str); end - def hash_colon_key?(node); end - def invalid_double_quotes?(source); end - def quoted?(sym_node); end - def style; end - def wrong_quotes?(node); end -end - -RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def acceptable_exploded_args?(args); end - def allowed_non_exploded_type?(arg); end - def check_compact(node); end - def check_exploded(node); end - def correction_compact_to_exploded(node); end - def correction_exploded_to_compact(node); end - def requires_parens?(parent); end -end - -RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def integer_op_rand?(param0 = T.unsafe(nil)); end - def on_send(node); end - def rand_modified?(param0 = T.unsafe(nil)); end - def rand_op_integer?(param0 = T.unsafe(nil)); end - def random_call(param0 = T.unsafe(nil)); end - def to_int(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def boundaries_from_random_node(random_node); end - def corrected_integer_op_rand(node); end - def corrected_rand_modified(node); end - def corrected_rand_op_integer(node); end - def prefix_from_prefix_node(node); end -end - -RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def argument_range(node); end - def redundant_arg_for_method(method_name); end - def redundant_argument?(node); end -end - -RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def redundant_assignment?(param0 = T.unsafe(nil)); end - - private - - def check_begin_node(node); end - def check_branch(node); end - def check_case_node(node); end - def check_ensure_node(node); end - def check_if_node(node); end - def check_rescue_node(node); end -end - -RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_kwbegin(node); end - - private - - def any_ancestor_assignment_node?(node); end - def begin_block_has_multiline_statements?(node); end - def condition_range(node); end - def contain_rescue_or_ensure?(node); end - def correct_modifier_form_after_multiline_begin_block(corrector, node); end - def empty_begin?(node); end - def register_offense(node); end - def replace_begin_with_statement(corrector, offense_range, node); end - def restore_removed_comments(corrector, offense_range, node, first_child); end - def use_modifier_form_after_multiline_begin_block?(node); end - def valid_begin_assignment?(node); end - def valid_context_using_only_begin?(node); end -end - -RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def on_percent_literal(node); end - def requires_interpolation?(node); end -end - -RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def correct_ternary(corrector, node); end - def else_source(else_branch); end - def make_ternary_form(node); end - def message(node); end - def offense?(node); end - def range_of_offense(node); end - def require_parentheses?(node); end - def use_hash_key_assignment?(else_branch); end - def use_if_branch?(else_branch); end - def without_argument_parentheses_method?(node); end -end - -RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def redundant_condition?(param0 = T.unsafe(nil)); end - def redundant_condition_inverted?(param0 = T.unsafe(nil)); end - - private - - def configured_indentation_width; end - def indented_else_node(expression, node); end - def invert_expression?(node); end - def message(node); end - def offense?(node); end - def replacement_condition(node); end -end - -RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def compact?(param0 = T.unsafe(nil)); end - def exploded?(param0 = T.unsafe(nil)); end - def fix_compact(node); end - def fix_exploded(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def rails_cache?(param0 = T.unsafe(nil)); end - def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end - - private - - def basic_literal?(node); end - def build_bad_method(send, body); end - def build_good_method(send, body); end - def check_for_constant?; end - def check_for_string?; end - def const_type?(node); end - def fetch_range(send, node); end - def should_not_check?(send, body); end -end - -RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def require_call?(param0 = T.unsafe(nil)); end - - private - - def extension_range(name_node); end -end - -RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - private - - def immutable_literal?(node); end - def strip_parenthesis(node); end -end - -RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def autocorrect_other(corrector, embedded_node, node); end - def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end - def autocorrect_variable_interpolation(corrector, embedded_node, node); end - def embedded_in_percent_array?(node); end - def implicit_concatenation?(node); end - def interpolation?(node); end - def require_parentheses?(node); end - def single_interpolation?(node); end - def single_variable_interpolation?(node); end - def variable_interpolation?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Parentheses - extend ::RuboCop::Cop::AutoCorrector - - def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - def first_send_argument?(param0 = T.unsafe(nil)); end - def first_super_argument?(param0 = T.unsafe(nil)); end - def first_yield_argument?(param0 = T.unsafe(nil)); end - def interpolation?(param0 = T.unsafe(nil)); end - def method_node_and_args(param0 = T.unsafe(nil)); end - def on_begin(node); end - def range_end?(param0 = T.unsafe(nil)); end - def rescue?(param0 = T.unsafe(nil)); end - def square_brackets?(param0 = T.unsafe(nil)); end - - private - - def allowed_ancestor?(node); end - def allowed_array_or_hash_element?(node); end - def allowed_expression?(node); end - def allowed_method_call?(node); end - def allowed_multiple_expression?(node); end - def call_chain_starts_with_int?(begin_node, send_node); end - def check(begin_node); end - def check_send(begin_node, node); end - def check_unary(begin_node, node); end - def disallowed_literal?(begin_node, node); end - def empty_parentheses?(node); end - def first_arg_begins_with_hash_literal?(node); end - def first_argument?(node); end - def hash_or_array_element?(node); end - def ignore_syntax?(node); end - def keyword_ancestor?(node); end - def keyword_with_redundant_parentheses?(node); end - def like_method_argument_parentheses?(node); end - def method_call_with_redundant_parentheses?(node); end - def method_chain_begins_with_hash_literal?(node); end - def offense(node, msg); end - def only_begin_arg?(args); end - def only_closing_paren_before_comma?(node); end - def parens_allowed?(node); end - def raised_to_power_negative_numeric?(begin_node, node); end - def suspect_unary?(node); end -end - -class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - def on_str(node); end - - private - - def acceptable_capital_q?(node); end - def acceptable_q?(node); end - def allowed_percent_q?(node); end - def check(node); end - def interpolated_quotes?(node); end - def message(node); end - def start_with_percent_q_variant?(string); end - def string_literal?(node); end -end - -RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def backslash_b?(elem); end - def each_redundant_character_class(node); end - def each_single_element_character_class(node); end - def redundant_single_element_character_class?(node, char_class); end - def requires_escape_outside_char_class?(elem); end - def whitespace_in_free_space_mode?(node, elem); end - def without_character_class(loc); end -end - -RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def allowed_escape?(node, char, within_character_class); end - def delimiter?(node, char); end - def each_escape(node); end - def escape_range_at_index(node, index); end -end - -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def add_braces(corrector, node); end - def add_brackets(corrector, node); end - def allow_multiple_return_values?; end - def check_begin_node(node); end - def check_branch(node); end - def check_case_node(node); end - def check_ensure_node(node); end - def check_if_node(node); end - def check_resbody_node(node); end - def check_rescue_node(node); end - def check_return_node(node); end - def correct_with_arguments(return_node, corrector); end - def correct_without_arguments(return_node, corrector); end - def hash_without_braces?(node); end - def message(node); end -end - -RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_and_asgn(node); end - def on_args(node); end - def on_block(node); end - def on_blockarg(node); end - def on_def(node); end - def on_defs(node); end - def on_if(node); end - def on_in_pattern(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - def on_until(node); end - def on_while(node); end - - private - - def add_lhs_to_local_variables_scopes(rhs, lhs); end - def add_masgn_lhs_variables(rhs, lhs); end - def add_match_var_scopes(in_pattern_node); end - def add_scope(node, local_variables = T.unsafe(nil)); end - def allow_self(node); end - def allowed_send_node?(node); end - def on_argument(node); end - def regular_method_call?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_send(node); end - def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end - def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end - - private - - def correction_range(node); end - def method_returning_self?(method_name); end - def redundant_assignment?(node); end -end - -RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def bad_method?(param0 = T.unsafe(nil)); end - def on_lvasgn(node); end - - private - - def inconvertible_to_modifier?(if_branch, else_branch); end - def multiple_statements?(branch); end - def register_offense(if_node, offense_branch, opposite_branch, keyword); end - def self_assign?(variable, branch); end - def use_if_and_else_branch?(expression); end -end - -RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def redundant_sort?(param0 = T.unsafe(nil)); end - - private - - def accessor_start(node); end - def arg_node(node); end - def arg_value(node); end - def base(accessor, arg); end - def find_redundant_sort(*nodes); end - def message(node, sorter, accessor); end - def offense_range(sort_node, node); end - def register_offense(node, sort_node, sorter, accessor); end - def suffix(sorter); end - def suggestion(sorter, accessor, arg); end -end - -RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_sort_by(param0 = T.unsafe(nil)); end - - private - - def sort_by_range(send, node); end -end - -RuboCop::Cop::Style::RedundantSortBy::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def allow_inner_slashes?; end - def allowed_mixed_percent_r?(node); end - def allowed_mixed_slash?(node); end - def allowed_omit_parentheses_with_percent_r_literal?(node); end - def allowed_percent_r_literal?(node); end - def allowed_slash_literal?(node); end - def calculate_replacement(node); end - def contains_disallowed_slash?(node); end - def contains_slash?(node); end - def correct_delimiters(node, corrector); end - def correct_inner_slashes(node, corrector); end - def inner_slash_after_correction(node); end - def inner_slash_before_correction(node); end - def inner_slash_for(opening_delimiter); end - def inner_slash_indices(node); end - def node_body(node, include_begin_nodes: T.unsafe(nil)); end - def preferred_delimiters; end - def slash_literal?(node); end -end - -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - - private - - def correct_rescue_block(corrector, node, parenthesized); end - def indentation_and_offset(node, parenthesized); end - def parenthesized?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - def rescue_standard_error?(param0 = T.unsafe(nil)); end - def rescue_without_error_class?(param0 = T.unsafe(nil)); end - - private - - def offense_for_exlicit_enforced_style(node); end - def offense_for_implicit_enforced_style(node, error); end -end - -RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def chained_send?(param0 = T.unsafe(nil)); end - def define_method?(param0 = T.unsafe(nil)); end - def on_return(node); end - def return_nil_node?(param0 = T.unsafe(nil)); end - def return_node?(param0 = T.unsafe(nil)); end - - private - - def correct_style?(node); end - def message(_node); end - def scoped_node?(node); end -end - -RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def check_node(node); end - def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end - def not_nil_check?(param0 = T.unsafe(nil)); end - def on_and(node); end - def on_if(node); end - def use_var_only_in_unless_modifier?(node, variable); end - - private - - def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end - def allowed_if_condition?(node); end - def autocorrect(corrector, node); end - def begin_range(node, method_call); end - def chain_size(method_chain, method); end - def comments(node); end - def end_range(node, method_call); end - def extract_common_parts(method_chain, checked_variable); end - def extract_parts(node); end - def extract_parts_from_and(node); end - def extract_parts_from_if(node); end - def find_matching_receiver_invocation(method_chain, checked_variable); end - def handle_comments(corrector, node, method_call); end - def method_call(node); end - def method_called?(send_node); end - def negated?(send_node); end - def relevant_comment_ranges(node); end - def unsafe_method?(send_node); end - def unsafe_method_used?(method_chain, method); end -end - -RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def sample_candidate?(param0 = T.unsafe(nil)); end - - private - - def correction(shuffle_arg, method, method_args); end - def extract_source(args); end - def message(shuffle_arg, method, method_args, range); end - def offensive?(method, method_args); end - def range_size(range_node); end - def sample_arg(method, method_args); end - def sample_size(method_args); end - def sample_size_for_one_arg(arg); end - def sample_size_for_two_args(first, second); end - def source_range(shuffle_node, node); end -end - -RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def calls_lvar?(param0 = T.unsafe(nil), param1); end - def creates_hash?(param0 = T.unsafe(nil)); end - def on_send(node); end - def regexp_match?(param0 = T.unsafe(nil)); end - - private - - def extract_send_node(block_node); end - def find_regexp(node, block); end - def match_predicate_without_receiver?(node); end - def receiver_allowed?(node); end - def register_offense(node, block_node, regexp); end -end - -RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end - def autocorrect(corrector, node); end - def autocorrect_boolean_node(corrector, node, rhs); end - def autocorrect_send_node(corrector, node, rhs); end - def check(node, var_type); end - def check_boolean_node(node, rhs, var_name, var_type); end - def check_send_node(node, rhs, var_name, var_type); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_new_investigation; end - - private - - def check_for_line_terminator_or_opener; end - def each_semicolon; end - def expressions_per_line(exprs); end - def find_semicolon_positions(line); end - def register_semicolon(line, column, after_expression); end - def tokens_for_lines; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def custom_fail_methods(param0); end - def kernel_call?(param0 = T.unsafe(nil), param1); end - def on_new_investigation; end - def on_rescue(node); end - def on_send(node); end - - private - - def allow(method_name, node); end - def autocorrect(corrector, node); end - def check_scope(method_name, node); end - def check_send(method_name, node); end - def command_or_kernel_call?(name, node); end - def each_command_or_kernel_call(method_name, node); end - def message(method_name); end -end - -RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def single_argument_dig?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def args_match?(method_name, args); end - def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end - def build_preferred_arguments_map(node, preferred_arguments); end - def eligible_arguments?(node); end - def eligible_method?(node); end - def method_name(method); end - def method_names; end - def methods; end - def target_args(method_name); end -end - -RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def allow_empty?; end - def autocorrect(corrector, node); end - def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end - def correct_to_endless(corrector, node); end - def correct_to_endless?(body_node); end - def correct_to_multiline(corrector, node); end - def disallow_endless_method_style?; end - def each_part(body); end - def method_body_source(method_body); end - def move_comment(node, corrector); end - def require_parentheses?(method_body); end -end - -RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end - def range_till_minus_one?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def allow_modifier?; end - def arguments_range(node); end - def assigned_variables(condition); end - def autocorrect(corrector, node, if_branch); end - def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - def correct_for_comment(corrector, node, if_branch); end - def correct_for_guard_condition_style(corrector, node, if_branch, and_operator); end - def correct_from_unless_to_if(corrector, node); end - def correct_outer_condition(corrector, condition); end - def offending_branch?(branch); end - def replacement_condition(and_operator, condition); end - def requrie_parentheses?(condition); end - def use_variable_assignment_in_condition?(condition, if_branch); end - def wrap_condition?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RequireLibrary - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node, global_var); end - def message(global_var); end - def on_gvar(node); end - - private - - def add_require_english?; end - def english_name_replacement(preferred_name, node); end - def format_english_message(global_var); end - def format_list(items); end - def format_message(english, regular, global); end - def preferred_names(global); end - def replacement(node, global_var); end - def should_require_english?(global_var); end -end - -RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def message(_node); end - def missing_parentheses?(node); end - def missing_parentheses_corrector(corrector, node); end - def parentheses?(node); end - def redundant_parentheses?(node); end - def stabby_lambda_with_args?(node); end - def unwanted_parentheses_corrector(corrector, node); end -end - -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - - def on_class(class_node); end - - private - - def class_convertible_to_module?(class_node); end - def class_elements(class_node); end - def extend_call?(node); end - def sclass_convertible_to_module?(node); end -end - -RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def stderr_puts?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def stderr_gvar?(sym); end - def stderr_puts_range(send); end -end - -RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - def on_send(node); end - def string_concatenation?(param0 = T.unsafe(nil)); end - - private - - def collect_parts(node, parts = T.unsafe(nil)); end - def corrected_ancestor?(node); end - def find_topmost_plus_node(node); end - def handle_quotes(parts); end - def line_end_concatenation?(node); end - def offensive_for_mode?(receiver_node); end - def plus_node?(node); end - def register_offense(topmost_plus_node, parts); end - def replacement(parts); end - def single_quoted?(str_node); end - def uncorrectable?(part); end -end - -RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_pair(node); end - def receive_environments_method?(param0 = T.unsafe(nil)); end - def string_hash_key?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def accept_child_double_quotes?(nodes); end - def all_string_literals?(nodes); end - def autocorrect(corrector, node); end - def check_multiline_quote_style(node, quote); end - def consistent_multiline?; end - def detect_quote_styles(node); end - def message(_node); end - def offense?(node); end - def register_offense(node, message: T.unsafe(nil)); end - def unexpected_double_quotes?(quote); end - def unexpected_single_quotes?(quote); end -end - -RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - - private - - def message(_node); end - def offense?(node); end -end - -class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def lstrip_rstrip(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def struct_constructor?(param0 = T.unsafe(nil)); end - - private - - def correct_parent(parent, corrector); end - def range_for_empty_class_body(class_node, struct_new); end -end - -RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def allowed_assignment?(node); end - def correction_range(tmp_assign, y_assign); end - def lhs(node); end - def message(x_assign, y_assign); end - def replacement(x_assign); end - def rhs(node); end - def simple_assignment?(node); end - def swapping_values?(tmp_assign, x_assign, y_assign); end -end - -RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def build_bracketed_array(node); end - def symbol_without_quote?(string); end - def symbols_contain_spaces?(node); end - def to_symbol_literal(string); end - - class << self - def largest_brackets; end - def largest_brackets=(_arg0); end - end -end - -RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_sym(node); end -end - -RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::IgnoredMethods - extend ::RuboCop::Cop::IgnoredMethods::Config - extend ::RuboCop::Cop::AutoCorrector - - def destructuring_block_argument?(argument_node); end - def on_block(node); end - def on_numblock(node); end - def proc_node?(param0 = T.unsafe(nil)); end - def symbol_proc?(param0 = T.unsafe(nil)); end - def symbol_proc_receiver?(param0 = T.unsafe(nil)); end - - private - - def allow_if_method_has_argument?(node); end - def autocorrect(corrector, node); end - def autocorrect_with_args(corrector, node, args, method_name); end - def autocorrect_without_args(corrector, node); end - def begin_pos_for_replacement(node); end - def block_range_with_space(node); end - def register_offense(node, method_name, block_method_name); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::TernaryCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def correction(node); end - def element_assignment?(node); end - def extract_branches(node); end - def move_branch_inside_condition(corrector, branch, assignment); end - def remove_parentheses(corrector, node); end - def ternary(node); end - end -end - -class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def method_name(param0 = T.unsafe(nil)); end - def on_if(node); end - def only_closing_parenthesis_is_last_line?(condition); end - - private - - def autocorrect(corrector, node); end - def below_ternary_precedence?(child); end - def complex_condition?(condition); end - def correct_parenthesized(corrector, condition); end - def correct_unparenthesized(corrector, condition); end - def infinite_loop?; end - def message(node); end - def non_complex_expression?(condition); end - def non_complex_send?(node); end - def offense?(node); end - def parenthesized?(node); end - def redundant_parentheses_enabled?; end - def require_parentheses?; end - def require_parentheses_when_complex?; end - def unparenthesized_method_call?(child); end - def unsafe_autocorrect?(condition); end - def whitespace_after?(node); end -end - -RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base - def define_method_block?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def top_level_method_definition?(node); end -end - -RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_module(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def arg_count(node); end - def argument_tokens(node); end - def last_comma(node); end - def trailing_comma?(node); end - def useless_trailing_comma?(node); end -end - -RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def body_and_end_on_same_line?(node); end - def trailing_end?(node); end -end - -RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_masgn(node); end - - private - - def allow_named_underscore_variables; end - def children_offenses(variables); end - def find_first_offense(variables); end - def find_first_possible_offense(variables); end - def main_node_offense(node); end - def range_for_parentheses(offense, left); end - def reverse_index(collection, item); end - def splat_variable_before?(first_offense, variables); end - def unneeded_ranges(node); end - def unused_range(node_type, mlhs_node, right); end - def unused_variables_only?(offense, variables); end -end - -RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def accessor(kind, method_name); end - def allow_dsl_writers?; end - def allow_predicates?; end - def allowed_method_name?(node); end - def allowed_method_names; end - def allowed_reader?(node); end - def allowed_writer?(method_name); end - def autocorrect(corrector, node); end - def autocorrect_class(corrector, node); end - def autocorrect_instance(corrector, node); end - def dsl_writer?(method_name); end - def exact_name_match?; end - def ignore_class_methods?; end - def in_module_or_instance_eval?(node); end - def looks_like_trivial_reader?(node); end - def names_match?(node); end - def on_method_def(node); end - def top_level_node?(node); end - def trivial_accessor_kind(node); end - def trivial_reader?(node); end - def trivial_writer?(node); end -end - -RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def range_between_condition_and_else(node, condition); end - def range_between_else_and_end(node); end -end - -RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def and_with_or?(param0 = T.unsafe(nil)); end - def logical_operator?(param0 = T.unsafe(nil)); end - def on_if(node); end - def or_with_and?(param0 = T.unsafe(nil)); end - - private - - def mixed_logical_operator?(node); end - def mixed_precedence_and?(node); end - def mixed_precedence_or?(node); end -end - -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def unpack_and_first_element?(param0 = T.unsafe(nil)); end - - private - - def first_element_range(node, unpack_call); end -end - -RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_node_with_interpolations(node); end - - private - - def message(range); end - def var_nodes(nodes); end -end - -RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_when(node); end -end - -RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def build_bracketed_array(node); end - def complex_content?(strings, complex_regex: T.unsafe(nil)); end - def invalid_percent_array_contents?(node); end - def word_regex; end - - class << self - def largest_brackets; end - def largest_brackets=(_arg0); end - end -end - -RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def actual_code_range(node); end - def corrected_code(node); end - def enforce_yoda?; end - def equality_only?; end - def interpolation?(node); end - def message(node); end - def non_equality_operator?(node); end - def noncommutative_operator?(node); end - def program_name?(name); end - def reverse_comparison(operator); end - def source_file_path_constant?(node); end - def valid_yoda?(node); end - def yoda_compatible_condition?(node); end -end - -RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - def nonzero_length_predicate(param0 = T.unsafe(nil)); end - def on_send(node); end - def other_receiver(param0 = T.unsafe(nil)); end - def zero_length_predicate(param0 = T.unsafe(nil)); end - def zero_length_receiver(param0 = T.unsafe(nil)); end - - private - - def check_nonzero_length_predicate(node); end - def check_zero_length_predicate(node); end - def replacement(node); end -end - -RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::RangeHelp - - private - - def empty_brackets?(left_bracket_token, right_bracket_token); end - def empty_offense(node, range, message, command); end - def empty_offenses(node, left, right, message); end - def extra_space?(token, side); end - def no_space_between?(left_bracket_token, right_bracket_token); end - def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end - def offending_empty_no_space?(config, left_token, right_token); end - def offending_empty_space?(config, left_token, right_token); end - def on_new_investigation; end - def reposition(src, pos, step); end - def side_space_range(range:, side:); end - def space_between?(left_bracket_token, right_bracket_token); end - def space_offense(node, token, side, message, command); end - def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end -end - -RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) -RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SymbolHelp - def hash_key?(node); end -end - -module RuboCop::Cop::TargetRubyVersion - def minimum_target_ruby_version(version); end - def required_minimum_ruby_version; end - def support_target_ruby_version?(version); end -end - -class RuboCop::Cop::Team - def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end - - def autocorrect?; end - def cops; end - def debug?; end - def errors; end - def external_dependency_checksum; end - def forces; end - def inspect_file(processed_source); end - def investigate(processed_source); end - def updated_source_file; end - def updated_source_file?; end - def warnings; end - - private - - def autocorrect(processed_source, report); end - def autocorrect_report(report); end - def be_ready; end - def collate_corrections(report); end - def each_corrector(report); end - def handle_error(error, location, cop); end - def handle_warning(error, location); end - def investigate_partial(cops, processed_source); end - def process_errors(file, errors); end - def reset; end - def roundup_relevant_cops(filename); end - def support_target_rails_version?(cop); end - def support_target_ruby_version?(cop); end - def suppress_clobbering; end - def validate_config; end - - class << self - def forces_for(cops); end - def mobilize(cop_classes, config, options = T.unsafe(nil)); end - def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end - def new(cop_or_classes, config, options = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::TrailingBody - def body_on_first_line?(node, body); end - def first_part_of(body); end - def trailing_body?(node); end -end - -module RuboCop::Cop::TrailingComma - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - def allowed_multiline_argument?(node); end - def any_heredoc?(items); end - def autocorrect_range(item); end - def avoid_comma(kind, comma_begin_pos, extra_info); end - def brackets?(node); end - def check(node, items, kind, begin_pos, end_pos); end - def check_comma(node, kind, comma_pos); end - def check_literal(node, kind); end - def comma_offset(items, range); end - def elements(node); end - def extra_avoid_comma_info; end - def heredoc?(node); end - def heredoc_send?(node); end - def inside_comment?(range, comma_offset); end - def method_name_and_arguments_on_same_line?(node); end - def multiline?(node); end - def no_elements_on_same_line?(node); end - def on_same_line?(range1, range2); end - def put_comma(items, kind); end - def should_have_comma?(style, node); end - def style_parameter_name; end -end - -RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::UncommunicativeName - def check(node, args); end - - private - - def allow_nums; end - def allowed_names; end - def arg_range(arg, length); end - def case_offense(node, range); end - def ends_with_num?(name); end - def forbidden_names; end - def forbidden_offense(node, range, name); end - def issue_offenses(node, range, name); end - def length_offense(node, range); end - def long_enough?(name); end - def min_length; end - def name_type(node); end - def num_offense(node, range); end - def uppercase?(name); end -end - -RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::UnusedArgCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - def correct(corrector, processed_source, node); end - def correct_for_blockarg_type(corrector, node); end - def processed_source; end - end -end - -module RuboCop::Cop::Util - include ::RuboCop::PathUtil - - private - - def add_parentheses(node, corrector); end - def args_begin(node); end - def args_end(node); end - def begins_its_line?(range); end - def comment_line?(line_source); end - def comment_lines?(node); end - def compatible_external_encoding_for?(src); end - def double_quotes_required?(string); end - def escape_string(string); end - def first_part_of_call_chain(node); end - def indent(node, offset: T.unsafe(nil)); end - def interpret_string_escapes(string); end - def line(node_or_range); end - def line_range(node); end - def needs_escaping?(string); end - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - def parentheses?(node); end - def same_line?(node1, node2); end - def to_string_literal(string); end - def to_supported_styles(enforced_style); end - def trim_string_interporation_escape_character(str); end - - class << self - def add_parentheses(node, corrector); end - def args_begin(node); end - def args_end(node); end - def begins_its_line?(range); end - def comment_line?(line_source); end - def comment_lines?(node); end - def double_quotes_required?(string); end - def escape_string(string); end - def first_part_of_call_chain(node); end - def indent(node, offset: T.unsafe(nil)); end - def interpret_string_escapes(string); end - def line(node_or_range); end - def line_range(node); end - def needs_escaping?(string); end - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - def parentheses?(node); end - def same_line?(node1, node2); end - def to_string_literal(string); end - def to_supported_styles(enforced_style); end - def trim_string_interporation_escape_character(str); end - end -end - -RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) -module RuboCop::Cop::Utils; end - -class RuboCop::Cop::Utils::FormatString - def initialize(string); end - - def format_sequences; end - def max_digit_dollar_num; end - def named_interpolation?; end - def valid?; end - - private - - def mixed_formats?; end - def parse; end -end - -RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Utils::FormatString::FormatSequence - def initialize(match); end - - def annotated?; end - def arity; end - def begin_pos; end - def end_pos; end - def flags; end - def max_digit_dollar_num; end - def name; end - def percent?; end - def precision; end - def style; end - def template?; end - def type; end - def width; end -end - -RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force - def investigate(processed_source); end - def process_node(node); end - def variable_table; end - - private - - def after_declaring_variable(arg); end - def after_entering_scope(arg); end - def after_leaving_scope(arg); end - def before_declaring_variable(arg); end - def before_entering_scope(arg); end - def before_leaving_scope(arg); end - def descendant_reference(node); end - def each_descendant_reference(loop_node); end - def find_variables_in_loop(loop_node); end - def inspect_variables_in_scope(scope_node); end - def mark_assignments_as_referenced_in_loop(node); end - def node_handler_method_name(node); end - def process_children(origin_node); end - def process_loop(node); end - def process_regexp_named_captures(node); end - def process_rescue(node); end - def process_scope(node); end - def process_send(node); end - def process_variable_assignment(node); end - def process_variable_declaration(node); end - def process_variable_multiple_assignment(node); end - def process_variable_operator_assignment(node); end - def process_variable_referencing(node); end - def process_zero_arity_super(node); end - def regexp_captured_names(node); end - def scanned_node?(node); end - def scanned_nodes; end - def skip_children!; end - def twisted_nodes(node); end -end - -RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::VariableForce::Assignment - include ::RuboCop::Cop::VariableForce::Branchable - - def initialize(node, variable); end - - def meta_assignment_node; end - def multiple_assignment?; end - def name; end - def node; end - def operator; end - def operator_assignment?; end - def reference!(node); end - def referenced; end - def referenced?; end - def references; end - def regexp_named_capture?; end - def scope; end - def used?; end - def variable; end - - private - - def multiple_assignment_node; end - def operator_assignment_node; end -end - -RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct - def assignment?; end - def node; end - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::Cop::VariableForce::Branch - class << self - def of(target_node, scope: T.unsafe(nil)); end - end -end - -class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - def left_body?; end - def right_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::Base < ::Struct - def ==(other); end - def always_run?; end - def branched?; end - def child_node; end - def child_node=(_); end - def control_node; end - def each_ancestor(include_self: T.unsafe(nil), &block); end - def eql?(other); end - def exclusive_with?(other); end - def hash; end - def may_jump_to_other_branch?; end - def may_run_incompletely?; end - def parent; end - def scope; end - def scope=(_); end - - private - - def scan_ancestors; end - - class << self - def [](*_arg0); end - def classes; end - def define_predicate(name, child_index: T.unsafe(nil)); end - def inherited(subclass); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - def type; end - end -end - -RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def else_body?; end - def target?; end - def when_clause?; end -end - -class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def else_body?; end - def in_pattern?; end - def target?; end -end - -class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - def always_run?; end - def ensure_body?; end - def main_body?; end -end - -module RuboCop::Cop::VariableForce::Branch::ExceptionHandler - def may_jump_to_other_branch?; end - def may_run_incompletely?; end -end - -class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def collection?; end - def element?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def falsey_body?; end - def truthy_body?; end -end - -module RuboCop::Cop::VariableForce::Branch::LogicalOperator - def always_run?; end -end - -class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - def left_body?; end - def right_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - def always_run?; end - def else_body?; end - def main_body?; end - def rescue_clause?; end -end - -module RuboCop::Cop::VariableForce::Branch::SimpleConditional - def always_run?; end - def conditional_clause?; end -end - -class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -module RuboCop::Cop::VariableForce::Branchable - def branch; end - def run_exclusively_with?(other); end -end - -RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Reference - include ::RuboCop::Cop::VariableForce::Branchable - - def initialize(node, scope); end - - def explicit?; end - def node; end - def scope; end -end - -RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Scope - def initialize(node); end - - def ==(other); end - def body_node; end - def each_node(&block); end - def include?(target_node); end - def naked_top_level; end - def naked_top_level?; end - def name; end - def node; end - def variables; end - - private - - def ancestor_node?(target_node); end - def belong_to_inner_scope?(target_node); end - def belong_to_outer_scope?(target_node); end - def scan_node(node, &block); end -end - -RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Variable - def initialize(name, declaration_node, scope); end - - def argument?; end - def assign(node); end - def assignments; end - def block_argument?; end - def capture_with_block!; end - def captured_by_block; end - def captured_by_block?; end - def declaration_node; end - def explicit_block_local_variable?; end - def in_modifier_if?(assignment); end - def keyword_argument?; end - def method_argument?; end - def name; end - def reference!(node); end - def referenced?; end - def references; end - def scope; end - def should_be_unused?; end - def used?; end -end - -RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::VariableForce::VariableReference < ::Struct - def assignment?; end - def name; end - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::VariableForce::VariableTable - def initialize(hook_receiver = T.unsafe(nil)); end - - def accessible_variables; end - def assign_to_variable(name, node); end - def current_scope; end - def current_scope_level; end - def declare_variable(name, node); end - def find_variable(name); end - def invoke_hook(hook_name, *args); end - def pop_scope; end - def push_scope(scope_node); end - def reference_variable(name, node); end - def scope_stack; end - def variable_exist?(name); end - - private - - def mark_variable_as_captured_by_block_if_so(variable); end -end - -RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) - -module RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - def visibility_block?(param0 = T.unsafe(nil)); end - - private - - def find_visibility_end(node); end - def find_visibility_start(node); end - def node_visibility(node); end -end - -RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Array) - -class RuboCop::DirectiveComment - def initialize(comment, cop_registry = T.unsafe(nil)); end - - def all_cops?; end - def comment; end - def cop_names; end - def cop_registry; end - def cops; end - def department_names; end - def directive_count; end - def disabled?; end - def disabled_all?; end - def enabled?; end - def enabled_all?; end - def in_directive_department?(cop); end - def line_number; end - def match?(cop_names); end - def match_captures; end - def mode; end - def overridden_by_department?(cop); end - def range; end - def single_line?; end - - private - - def all_cop_names; end - def cop_names_for_department(department); end - def department?(name); end - def exclude_redundant_directive_cop(cops); end - def parsed_cop_names; end - def splitted_cops_string; end - - class << self - def before_comment(line); end - end -end - -RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = T.let(T.unsafe(nil), String) -class RuboCop::Error < ::StandardError; end - -class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error - def initialize(cause:, node:, cop:); end - - def cause; end - def column; end - def cop; end - def line; end - def message; end -end - -module RuboCop::ExcludeLimit - def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end - - private - - def transform(parameter_name); end -end - -module RuboCop::Ext; end - -module RuboCop::Ext::ProcessedSource - def comment_config; end - def disabled_line_ranges; end -end - -module RuboCop::Ext::RegexpNode - def assign_properties(*_arg0); end - def each_capture(named: T.unsafe(nil)); end - def parsed_tree; end - - private - - def with_interpolations_blanked; end -end - -RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) -module RuboCop::Ext::RegexpParser; end -module RuboCop::Ext::RegexpParser::Expression; end - -module RuboCop::Ext::RegexpParser::Expression::Base - def expression; end - def loc; end - def origin; end - def origin=(_arg0); end - - private - - def build_location; end -end - -module RuboCop::Ext::RegexpParser::Expression::CharacterSet - def build_location; end -end - -class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map - def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end - - def begin; end - def body; end - def end; end - def quantifier; end -end - -module RuboCop::FileFinder - def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - - private - - def traverse_files_upwards(filename, start_dir, stop_dir); end - - class << self - def root_level=(level); end - def root_level?(path, stop_dir); end - end -end - -module RuboCop::Formatter; end - -class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter - def finished(inspected_files); end -end - -class RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def file_started(file, options); end - def finished(inspected_files); end - def options; end - def output; end - def started(target_files); end -end - -class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter - def report_file(file, offenses); end - - private - - def report_highlighted_area(highlighted_area); end - def report_line(location); end - def report_offense(file, offense); end - def valid_line?(offense); end -end - -RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -module RuboCop::Formatter::Colorizable - def black(string); end - def blue(string); end - def colorize(string, *args); end - def cyan(string); end - def green(string); end - def magenta(string); end - def rainbow; end - def red(string); end - def white(string); end - def yellow(string); end -end - -class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def file_started(_file, _file_info); end - def finished(_inspected_files); end - - private - - def command; end - def cop_config_params(default_cfg, cfg); end - def default_config(cop_name); end - def excludes(offending_files, cop_name, parent); end - def merge_mode_for_exclude?(cfg); end - def output_cop(cop_name, offense_count); end - def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - def output_cop_config(output_buffer, cfg, cop_name); end - def output_cop_param_comments(output_buffer, params, default_cfg); end - def output_exclude_list(output_buffer, offending_files, cop_name); end - def output_exclude_path(output_buffer, exclude_path, parent); end - def output_offending_files(output_buffer, cfg, cop_name); end - def output_offenses; end - def set_max(cfg, cop_name); end - def show_offense_counts?; end - def show_timestamp?; end - def timestamp; end - - class << self - def config_to_allow_offenses; end - def config_to_allow_offenses=(_arg0); end - def detected_styles; end - def detected_styles=(_arg0); end - end -end - -RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - - private - - def message(offense); end -end - -class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end -end - -class RuboCop::Formatter::FormatterSet < ::Array - def initialize(options = T.unsafe(nil)); end - - def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - def close_output_files; end - def file_finished(file, offenses); end - def file_started(file, options); end - def finished(*args); end - def started(*args); end - - private - - def builtin_formatter_class(specified_key); end - def custom_formatter_class(specified_class_name); end - def formatter_class(formatter_type); end -end - -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) - -class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter - def initialize(*output); end - - def count_stats(offenses); end - def file_finished(file, offenses); end - def progressbar_color; end - def started(target_files); end - def with_color; end -end - -RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - - private - - def github_escape(string); end - def github_severity(offense); end - def minimum_severity_to_fail; end - def report_offense(file, offense); end -end - -RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def files; end - def finished(inspected_files); end - def render_html; end - def started(target_files); end - def summary; end -end - -class RuboCop::Formatter::HTMLFormatter::Color < ::Struct - def alpha; end - def alpha=(_); end - def blue; end - def blue=(_); end - def fade_out(amount); end - def green; end - def green=(_); end - def red; end - def red=(_); end - def to_s; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::HTMLFormatter::ERBContext - include ::RuboCop::PathUtil - include ::RuboCop::Formatter::TextUtil - - def initialize(files, summary); end - - def base64_encoded_logo_image; end - def binding; end - def decorated_message(offense); end - def escape(string); end - def files; end - def highlighted_source_line(offense); end - def hightlight_source_tag(offense); end - def possible_ellipses(location); end - def source_after_highlight(offense); end - def source_before_highlight(offense); end - def summary; end -end - -RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct - def offenses; end - def offenses=(_); end - def path; end - def path=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct - def inspected_files; end - def inspected_files=(_); end - def offense_count; end - def offense_count=(_); end - def target_files; end - def target_files=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def finished(inspected_files); end - def hash_for_file(file, offenses); end - def hash_for_location(offense); end - def hash_for_offense(offense); end - def metadata_hash; end - def output_hash; end - def started(target_files); end -end - -class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - def classname_attribute_value(file); end - def file_finished(file, offenses); end - def finished(_inspected_files); end - def offenses_for_cop(all_offenses, cop); end - def relevant_for_output?(options, target_offenses); end - - private - - def add_failure_to(testcase, offenses, cop_name); end - def reset_count; end -end - -class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(_file, offenses); end - def finished(_inspected_files); end - def offense_counts; end - def ordered_offense_counts(offense_counts); end - def report_summary(offense_counts); end - def started(target_files); end - def total_offense_count(offense_counts); end -end - -class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - def initialize(output, options = T.unsafe(nil)); end - - def cols; end - def file_finished(file, offenses); end - def file_started(_file, _options); end - def next_step(offenses); end - def pacdots(number); end - def progress_line; end - def progress_line=(_arg0); end - def started(target_files); end - def step(character); end - def update_progress_line; end -end - -RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) -RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) - -class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def finished(inspected_files); end - def report_file_as_mark(offenses); end - def started(target_files); end -end - -RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter - def report_summary(file_count, offense_count, correction_count, correctable_count); end -end - -class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::PathUtil - - def file_finished(file, offenses); end - def finished(inspected_files); end - def report_file(file, offenses); end - def report_summary(file_count, offense_count, correction_count, correctable_count); end - def started(_target_files); end - - private - - def annotate_message(msg); end - def colored_severity_code(offense); end - def count_stats(offenses); end - def message(offense); end -end - -RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::SimpleTextFormatter::Report - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::Formatter::TextUtil - - def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_auto_correct: T.unsafe(nil)); end - - def summary; end - - private - - def correctable; end - def corrections; end - def files; end - def offenses; end - def rainbow; end -end - -class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter - def file_finished(file, offenses); end - def started(target_files); end - - private - - def annotate_message(msg); end - def message(offense); end - def report_highlighted_area(highlighted_area); end - def report_line(location); end - def report_offense(file, offense); end -end - -module RuboCop::Formatter::TextUtil - private - - def pluralize(number, thing, options = T.unsafe(nil)); end - - class << self - def pluralize(number, thing, options = T.unsafe(nil)); end - end -end - -class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - def finished(_inspected_files); end - def offense_counts; end - def ordered_offense_counts(offense_counts); end - def report_summary(offense_counts); end - def started(target_files); end - def total_offense_count(offense_counts); end -end - -class RuboCop::IncorrectCopNameError < ::StandardError; end - -class RuboCop::Lockfile - def dependencies; end - def gems; end - def includes_gem?(name); end - - private - - def parser; end -end - -class RuboCop::MagicComment - def initialize(comment); end - - def any?; end - def encoding_specified?; end - def frozen_string_literal; end - def frozen_string_literal?; end - def frozen_string_literal_specified?; end - def shareable_constant_value; end - def shareable_constant_value_specified?; end - def valid?; end - def valid_literal_value?; end - def valid_shareable_constant_value?; end - - private - - def extract(pattern); end - def specified?(value); end - - class << self - def parse(comment); end - end -end - -class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment - def encoding; end - def without(type); end - - private - - def match(keyword); end - def tokens; end -end - -class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment - private - - def extract_frozen_string_literal; end - def extract_shareable_constant_value; end -end - -RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment - def encoding; end - def without(type); end - - private - - def extract_frozen_string_literal; end - def extract_shareable_constant_value; end -end - -RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp) - -class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment - def encoding; end - def frozen_string_literal; end - def shareable_constant_value; end -end - -RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) -RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) - -module RuboCop::NameSimilarity - private - - def find_similar_name(target_name, names); end - def find_similar_names(target_name, names); end - - class << self - def find_similar_name(target_name, names); end - def find_similar_names(target_name, names); end - end -end - -RuboCop::NodePattern = RuboCop::AST::NodePattern -class RuboCop::OptionArgumentError < ::StandardError; end - -class RuboCop::Options - def initialize; end - - def parse(command_line_args); end - - private - - def add_additional_modes(opts); end - def add_autocorrection_options(opts); end - def add_cache_options(opts); end - def add_check_options(opts); end - def add_config_generation_options(opts); end - def add_cop_selection_csv_option(option, opts); end - def add_general_options(opts); end - def add_output_options(opts); end - def add_severity_option(opts); end - def args_from_env; end - def args_from_file; end - def define_options; end - def long_opt_symbol(args); end - def option(opts, *args); end - def rainbow; end - def require_feature(file); end - def section(opts, heading, &_block); end -end - -RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) -RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) -RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) -module RuboCop::OptionsHelp; end -RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) -RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) -RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) - -class RuboCop::OptionsValidator - def initialize(options); end - - def boolean_or_empty_cache?; end - def disable_parallel_when_invalid_option_combo; end - def display_only_fail_level_offenses_with_autocorrect?; end - def except_syntax?; end - def incompatible_options; end - def only_includes_redundant_disable?; end - def validate_auto_correct; end - def validate_auto_gen_config; end - def validate_cache_enabled_for_cache_root; end - def validate_compatibility; end - def validate_cop_options; end - def validate_display_only_failed; end - def validate_exclude_limit_option; end - - class << self - def validate_cop_list(names); end - - private - - def format_message_from(name, cop_names); end - end -end - -module RuboCop::PathUtil - private - - def absolute?(path); end - def hidden_dir?(path); end - def hidden_file?(path); end - def hidden_file_in_not_hidden_dir?(pattern, path); end - def match_path?(pattern, path); end - def maybe_hidden_file?(path); end - def relative_path(path, base_dir = T.unsafe(nil)); end - def smart_path(path); end - - class << self - def absolute?(path); end - def hidden_dir?(path); end - def hidden_file?(path); end - def hidden_file_in_not_hidden_dir?(pattern, path); end - def match_path?(pattern, path); end - def maybe_hidden_file?(path); end - def relative_path(path, base_dir = T.unsafe(nil)); end - def smart_path(path); end - end -end - -module RuboCop::Platform - class << self - def windows?; end - end -end - -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -class RuboCop::RemoteConfig - def initialize(url, base_dir); end - - def file; end - def inherit_from_remote(file, path); end - def uri; end - - private - - def cache_name_from_uri; end - def cache_path; end - def cache_path_exists?; end - def cache_path_expired?; end - def cloned_url; end - def generate_request(uri); end - def handle_response(response, limit, &block); end - def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end -end - -RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) - -class RuboCop::ResultCache - def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end - - def debug?; end - def load; end - def path; end - def save(offenses); end - def valid?; end - - private - - def any_symlink?(path); end - def context_checksum(team, options); end - def file_checksum(file, config_store); end - def relevant_options_digest(options); end - def rubocop_checksum; end - def rubocop_extra_features; end - def symlink_protection_triggered?(path); end - def team_checksum(team); end - - class << self - def allow_symlinks_in_cache_location?(config_store); end - def cache_root(config_store); end - def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end - def inhibit_cleanup; end - def inhibit_cleanup=(_arg0); end - def rubocop_required_features; end - def rubocop_required_features=(_arg0); end - def source_checksum; end - def source_checksum=(_arg0); end - - private - - def remove_files(files, dirs, remove_count); end - def remove_oldest_files(files, dirs, cache_root, verbose); end - def requires_file_removal?(file_count, config_store); end - end -end - -RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) - -class RuboCop::Runner - def initialize(options, config_store); end - - def aborting=(_arg0); end - def aborting?; end - def errors; end - def run(paths); end - def warnings; end - - private - - def add_redundant_disables(file, offenses, source); end - def cached_result(file, team); end - def cached_run?; end - def check_for_infinite_loop(processed_source, offenses_by_iteration); end - def check_for_redundant_disables?(source); end - def considered_failure?(offense); end - def do_inspection_loop(file); end - def each_inspected_file(files); end - def file_finished(file, offenses); end - def file_offense_cache(file); end - def file_offenses(file); end - def file_started(file); end - def filter_cop_classes(cop_classes, config); end - def filtered_run?; end - def find_target_files(paths); end - def formatter_set; end - def get_processed_source(file); end - def inspect_file(processed_source, team = T.unsafe(nil)); end - def inspect_files(files); end - def iterate_until_no_changes(source, offenses_by_iteration); end - def list_files(paths); end - def minimum_severity_to_fail; end - def mobilize_team(processed_source); end - def mobilized_cop_classes(config); end - def process_file(file); end - def qualify_option_cop_names; end - def redundant_cop_disable_directive(file); end - def save_in_cache(cache, offenses); end - def standby_team(config); end - def style_guide_cops_only?(config); end - def team_for_redundant_disables(file, offenses, source); end - def warm_cache(target_files); end -end - -class RuboCop::Runner::InfiniteCorrectionLoop < ::RuntimeError - def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end - - def offenses; end -end - -RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) - -class RuboCop::StringInterpreter - class << self - def interpret(string); end - - private - - def interpret_hex(escape); end - def interpret_octal(escape); end - def interpret_string_escape(escape); end - def interpret_unicode(escape); end - end -end - -RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) -RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::TargetFinder - def initialize(config_store, options = T.unsafe(nil)); end - - def all_cops_include; end - def combined_exclude_glob_patterns(base_dir); end - def configured_include?(file); end - def debug?; end - def fail_fast?; end - def find(args, mode); end - def find_files(base_dir, flags); end - def force_exclusion?; end - def included_file?(file); end - def process_explicit_path(path, mode); end - def ruby_executable?(file); end - def ruby_extension?(file); end - def ruby_extensions; end - def ruby_file?(file); end - def ruby_filename?(file); end - def ruby_filenames; end - def ruby_interpreters(file); end - def stdin?; end - def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - def target_files_in_dir(base_dir = T.unsafe(nil)); end - def to_inspect?(file, hidden_files, base_dir_config); end - def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - - private - - def order; end -end - -RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) - -class RuboCop::TargetRuby - def initialize(config); end - - def rubocop_version_with_support; end - def source; end - def supported?; end - def version; end - - class << self - def supported_versions; end - end -end - -class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source - def name; end - - private - - def bundler_lock_file_path; end - def find_version; end -end - -RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) - -class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source - def name; end - - private - - def find_version; end -end - -class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source - extend ::RuboCop::AST::NodePattern::Macros - - def gem_requirement?(param0 = T.unsafe(nil)); end - def name; end - def required_ruby_version(param0); end - - private - - def find_minimal_known_ruby(right_hand_side); end - def find_version; end - def gemspec_filename; end - def gemspec_filepath; end - def version_from_array(array); end - def version_from_gemspec_file(file); end - def version_from_right_hand_side(right_hand_side); end -end - -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) -RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source - def name; end - - private - - def find_version; end -end - -class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source - def name; end - - private - - def filename; end - def find_version; end - def pattern; end - def version_file; end -end - -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) - -class RuboCop::TargetRuby::Source - def initialize(config); end - - def name; end - def to_s; end - def version; end -end - -class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile - def name; end - - private - - def filename; end - def pattern; end -end - -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Token = RuboCop::AST::Token - -module RuboCop::Util - class << self - def silence_warnings; end - end -end - -class RuboCop::ValidationError < ::RuboCop::Error; end - -module RuboCop::Version - class << self - def document_version; end - def extension_versions(env); end - def feature_version(feature); end - def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end - end -end - -RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -RuboCop::Version::MSG = T.let(T.unsafe(nil), String) -RuboCop::Version::STRING = T.let(T.unsafe(nil), String) -class RuboCop::Warning < ::StandardError; end - -module RuboCop::YAMLDuplicationChecker - class << self - def check(yaml_string, filename, &on_duplicated); end - - private - - def traverse(tree, &on_duplicated); end - end -end - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend - - def blank?; end -end diff --git a/sorbet/rbi/gems/rubocop@1.87.0.rbi b/sorbet/rbi/gems/rubocop@1.87.0.rbi new file mode 100644 index 00000000..753389f4 --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.87.0.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi deleted file mode 100644 index d41842bd..00000000 --- a/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +++ /dev/null @@ -1,405 +0,0 @@ -# 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`. - -class ProgressBar - class << self - def create(*args); end - end -end - -class ProgressBar::Base - extend ::Forwardable - - def initialize(options = T.unsafe(nil)); end - - def clear(*args, **_arg1_arg1, &block); end - def decrement; end - def finish; end - def finished?; end - def format(other); end - def format=(other); end - def increment; end - def inspect; end - def log(*args, **_arg1_arg1, &block); end - def pause; end - def paused?; end - def progress(*args, **_arg1_arg1, &block); end - def progress=(new_progress); end - def progress_mark=(mark); end - def refresh(*args, **_arg1_arg1, &block); end - def remainder_mark=(mark); end - def reset; end - def resume; end - def start(options = T.unsafe(nil)); end - def started?; end - def stop; end - def stopped?; end - def title; end - def title=(title); end - def to_h; end - def to_s(new_format = T.unsafe(nil)); end - def total(*args, **_arg1_arg1, &block); end - def total=(new_total); end - - protected - - def autofinish; end - def autofinish=(_arg0); end - def autostart; end - def autostart=(_arg0); end - def bar; end - def bar=(_arg0); end - def finished; end - def finished=(_arg0); end - def output; end - def output=(_arg0); end - def percentage; end - def percentage=(_arg0); end - def progressable; end - def progressable=(_arg0); end - def rate; end - def rate=(_arg0); end - def time; end - def time=(_arg0); end - def timer; end - def timer=(_arg0); end - def title_comp; end - def title_comp=(_arg0); end - def update_progress(*args); end -end - -module ProgressBar::Calculators; end - -class ProgressBar::Calculators::Length - def initialize(options = T.unsafe(nil)); end - - def calculate_length; end - def current_length; end - def current_length=(_arg0); end - def length; end - def length_changed?; end - def length_override; end - def length_override=(other); end - def output; end - def output=(_arg0); end - def reset_length; end - - private - - def dynamic_width; end - def dynamic_width_stty; end - def dynamic_width_tput; end - def dynamic_width_via_io_object; end - def dynamic_width_via_output_stream_object; end - def dynamic_width_via_system_calls; end - def terminal_width; end - def unix?; end -end - -class ProgressBar::Calculators::RunningAverage - class << self - def calculate(current_average, new_value_to_average, smoothing_factor); end - end -end - -module ProgressBar::Components; end - -class ProgressBar::Components::Bar - def initialize(options = T.unsafe(nil)); end - - def length; end - def length=(_arg0); end - def progress; end - def progress=(_arg0); end - def progress_mark; end - def progress_mark=(_arg0); end - def remainder_mark; end - def remainder_mark=(_arg0); end - def to_s(options = T.unsafe(nil)); end - def upa_steps; end - def upa_steps=(_arg0); end - - private - - def bar(length); end - def bar_with_percentage(length); end - def complete_bar(length); end - def complete_bar_with_percentage(length); end - def completed_length; end - def incomplete_space(length); end - def incomplete_string; end - def integrated_percentage_complete_string; end - def standard_complete_string; end - def unknown_progress_frame; end - def unknown_string; end -end - -ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK = T.let(T.unsafe(nil), String) -ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK = T.let(T.unsafe(nil), String) -ProgressBar::Components::Bar::DEFAULT_UPA_STEPS = T.let(T.unsafe(nil), Array) - -class ProgressBar::Components::Percentage - def initialize(options = T.unsafe(nil)); end - - def progress; end - def progress=(_arg0); end - - private - - def justified_percentage; end - def justified_percentage_with_precision; end - def percentage; end - def percentage_with_precision; end -end - -class ProgressBar::Components::Rate - def initialize(options = T.unsafe(nil)); end - - def progress; end - def progress=(_arg0); end - def rate_scale; end - def rate_scale=(_arg0); end - def started_at; end - def started_at=(_arg0); end - def stopped_at; end - def stopped_at=(_arg0); end - def timer; end - def timer=(_arg0); end - - private - - def base_rate; end - def elapsed_seconds; end - def rate_of_change(format_string = T.unsafe(nil)); end - def rate_of_change_with_precision; end - def scaled_rate; end -end - -class ProgressBar::Components::Time - def initialize(options = T.unsafe(nil)); end - - def elapsed_with_label; end - def estimated_with_label; end - - protected - - def estimated_with_friendly_oob; end - def estimated_with_no_oob; end - def estimated_with_unknown_oob; end - def out_of_bounds_time_format; end - def out_of_bounds_time_format=(format); end - def progress; end - def progress=(_arg0); end - def timer; end - def timer=(_arg0); end - - private - - def elapsed; end - def estimated; end - def estimated_seconds_remaining; end - def estimated_with_elapsed_fallback; end -end - -ProgressBar::Components::Time::ELAPSED_LABEL = T.let(T.unsafe(nil), String) -ProgressBar::Components::Time::ESTIMATED_LABEL = T.let(T.unsafe(nil), String) -ProgressBar::Components::Time::NO_TIME_ELAPSED_TEXT = T.let(T.unsafe(nil), String) -ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), String) -ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) -ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) -ProgressBar::Components::Time::OOB_TIME_FORMATS = T.let(T.unsafe(nil), Array) -ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), String) -ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) - -class ProgressBar::Components::Title - def initialize(options = T.unsafe(nil)); end - - def title; end - def title=(_arg0); end -end - -ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) -module ProgressBar::Format; end - -class ProgressBar::Format::Formatter - class << self - def process(format_string, max_length, bar); end - end -end - -class ProgressBar::Format::Molecule - def initialize(letter); end - - def bar_molecule?; end - def full_key; end - def key; end - def key=(_arg0); end - def lookup_value(environment, length = T.unsafe(nil)); end - def method_name; end - def method_name=(_arg0); end - def non_bar_molecule?; end -end - -ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) -ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) - -class ProgressBar::Format::String < ::String - def bar_molecule_placeholder_length; end - def bar_molecules; end - def displayable_length; end - def molecules; end - def non_bar_molecules; end -end - -ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) -ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) -class ProgressBar::InvalidProgressError < ::RuntimeError; end - -class ProgressBar::Output - def initialize(options = T.unsafe(nil)); end - - def clear_string; end - def length; end - def log(string); end - def refresh(options = T.unsafe(nil)); end - def stream; end - def stream=(_arg0); end - def with_refresh; end - - protected - - def bar; end - def bar=(_arg0); end - def length_calculator; end - def length_calculator=(_arg0); end - def throttle; end - def throttle=(_arg0); end - - private - - def print_and_flush; end - - class << self - def detect(options = T.unsafe(nil)); end - end -end - -ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) -module ProgressBar::Outputs; end - -class ProgressBar::Outputs::NonTty < ::ProgressBar::Output - def bar_update_string; end - def clear; end - def default_format; end - def eol; end - def last_update_length; end - def refresh_with_format_change(*_arg0); end - def resolve_format(*_arg0); end - - protected - - def last_update_length=(_arg0); end -end - -ProgressBar::Outputs::NonTty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) - -class ProgressBar::Outputs::Tty < ::ProgressBar::Output - def bar_update_string; end - def clear; end - def default_format; end - def eol; end - def refresh_with_format_change; end - def resolve_format(other_format); end -end - -ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) - -class ProgressBar::Progress - def initialize(options = T.unsafe(nil)); end - - def absolute; end - def decrement; end - def finish; end - def finished?; end - def increment; end - def none?; end - def percentage_completed; end - def percentage_completed_with_precision; end - def progress; end - def progress=(new_progress); end - def reset; end - def running_average; end - def running_average=(_arg0); end - def smoothing; end - def smoothing=(_arg0); end - def start(options = T.unsafe(nil)); end - def starting_position; end - def starting_position=(_arg0); end - def total; end - def total=(new_total); end - def total_with_unknown_indicator; end - def unknown?; end -end - -ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) -ProgressBar::Progress::DEFAULT_SMOOTHING = T.let(T.unsafe(nil), Float) -ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) -module ProgressBar::Refinements; end -module ProgressBar::Refinements::Enumerator; end - -class ProgressBar::Throttle - def initialize(options = T.unsafe(nil)); end - - def choke(options = T.unsafe(nil)); end - def rate; end - def rate=(_arg0); end - def started_at; end - def started_at=(_arg0); end - def stopped_at; end - def stopped_at=(_arg0); end - def timer; end - def timer=(_arg0); end -end - -class ProgressBar::Time - def initialize(time = T.unsafe(nil)); end - - def now; end - def unmocked_time_method; end - - protected - - def time; end - def time=(_arg0); end -end - -ProgressBar::Time::TIME_MOCKING_LIBRARY_METHODS = T.let(T.unsafe(nil), Array) - -class ProgressBar::Timer - def initialize(options = T.unsafe(nil)); end - - def divide_seconds(seconds); end - def elapsed_seconds; end - def elapsed_whole_seconds; end - def pause; end - def reset; end - def reset?; end - def restart; end - def resume; end - def start; end - def started?; end - def started_at; end - def started_at=(_arg0); end - def stop; end - def stopped?; end - def stopped_at; end - def stopped_at=(_arg0); end - - protected - - def time; end - def time=(_arg0); 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 00000000..c92481ce --- /dev/null +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem 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 00000000..56c13ae9 --- /dev/null +++ b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi @@ -0,0 +1,9 @@ +# 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/rubydex@0.2.5.rbi b/sorbet/rbi/gems/rubydex@0.2.5.rbi new file mode 100644 index 00000000..e4e8b4ba --- /dev/null +++ b/sorbet/rbi/gems/rubydex@0.2.5.rbi @@ -0,0 +1,806 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubydex` gem. +# Please instead update this file by running `bin/tapioca gem rubydex`. + + +# frozen_string_literal: true +# typed: strict + +# pkg:gem/rubydex#lib/rubydex/version.rb:3 +module Rubydex; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::AttrAccessorDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::AttrReaderDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::AttrWriterDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Class < ::Rubydex::Namespace + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ClassDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::ConstantReference)) } + def superclass; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ClassVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ClassVariableDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Comment + # pkg:gem/rubydex#lib/rubydex/comment.rb:12 + sig { params(string: String, location: Rubydex::Location).void } + def initialize(string:, location:); end + + # pkg:gem/rubydex#lib/rubydex/comment.rb:9 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/comment.rb:6 + sig { returns(String) } + def string; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Constant < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ConstantAlias < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::Declaration)) } + def target; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ConstantAliasDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ConstantDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ConstantReference < ::Rubydex::Reference + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(Rubydex::Location) } + def location; end + + class << self + def new(*args); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ConstantVisibilityDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Declaration + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Definition]) } + def definitions; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(Rubydex::Declaration) } + def owner; end + + # @abstract + # + # pkg:gem/rubydex#lib/rubydex/declaration.rb:18 + sig { returns(T::Enumerable[Rubydex::Reference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def unqualified_name; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def new(*args); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Definition + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Comment]) } + def comments; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::Declaration)) } + def declaration; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Boolean) } + def deprecated?; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Definition]) } + def lexical_nesting; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::Definition)) } + def lexical_owner; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::Location)) } + def name_location; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def new(*args); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Diagnostic + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:15 + sig { params(rule: Symbol, message: String, location: Rubydex::Location).void } + def initialize(rule:, message:, location:); end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:12 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:9 + sig { returns(String) } + def message; end + + # pkg:gem/rubydex#lib/rubydex/diagnostic.rb:6 + sig { returns(Symbol) } + def rule; end +end + +# A one based location intended for display purposes. This is what should be used when displaying a location to users, +# like in CLIs +# +# pkg:gem/rubydex#lib/rubydex/location.rb:70 +class Rubydex::DisplayLocation < ::Rubydex::Location + # Normalize to zero-based for comparison with Location + # + # pkg:gem/rubydex#lib/rubydex/location.rb:81 + sig { returns([String, Integer, Integer, Integer, Integer]) } + def comparable_values; end + + # Returns itself + # + # pkg:gem/rubydex#lib/rubydex/location.rb:74 + sig { returns(Rubydex::DisplayLocation) } + def to_display; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:86 + sig { returns(String) } + def to_s; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Document + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Definition]) } + def definitions; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def uri; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def new(*args); end + end +end + +class Rubydex::Error < StandardError; end + +# Represents `extend SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:21 +class Rubydex::Extend < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex/failures.rb:4 +class Rubydex::Failure + # pkg:gem/rubydex#lib/rubydex/failures.rb:9 + sig { params(message: String).void } + def initialize(message); end + + # pkg:gem/rubydex#lib/rubydex/failures.rb:6 + sig { returns(String) } + def message; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::GlobalVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::GlobalVariableAliasDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::GlobalVariableDefinition < ::Rubydex::Definition; end + +# The global graph representing all declarations and their relationships for the workspace +# +# Note: this class is partially defined in C to integrate with the Rust backend +# +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Graph + # pkg:gem/rubydex#lib/rubydex/graph.rb:26 + sig { params(workspace_path: T.nilable(String)).void } + def initialize(workspace_path: nil); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(fully_qualified_name: String).returns(T.nilable(Rubydex::Declaration)) } + def [](fully_qualified_name); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Failure]) } + def check_integrity; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def complete_expression(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def complete_method_argument(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def complete_method_call(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def complete_namespace_access(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def constant_references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Declaration]) } + def declarations; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } + def delete_document(uri); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Diagnostic]) } + def diagnostics; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(uri: String).returns(T.nilable(Rubydex::Document)) } + def document(uri); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Document]) } + def documents; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(encoding: String).void } + def encoding=(encoding); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(paths: T::Array[String]).void } + def exclude_paths(paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[String]) } + def excluded_paths; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(query: String).returns(T::Enumerable[Rubydex::Declaration]) } + def fuzzy_search(query); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(file_paths: T::Array[String]).returns(T::Array[String]) } + def index_all(file_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(uri: String, source: String, language_id: String).void } + def index_source(uri, source, language_id); end + + # Index all files and dependencies of the workspace that exists in `@workspace_path` + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:34 + sig { returns(T::Array[String]) } + def index_workspace; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def keyword(_arg0); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::MethodReference]) } + def method_references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(load_paths: T::Array[String]).returns(T::Array[String]) } + def require_paths(load_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.self_type) } + def resolve; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(name: String, nesting: T::Array[String]).returns(T.nilable(Rubydex::Declaration)) } + def resolve_constant(name, nesting); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(require_path: String, load_paths: T::Array[String]).returns(T.nilable(Rubydex::Document)) } + def resolve_require_path(require_path, load_paths); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(query: String).returns(T::Enumerable[Rubydex::Declaration]) } + def search(query); end + + # pkg:gem/rubydex#lib/rubydex/graph.rb:23 + sig { returns(String) } + def workspace_path; end + + # pkg:gem/rubydex#lib/rubydex/graph.rb:23 + sig { params(workspace_path: String).returns(String) } + def workspace_path=(workspace_path); end + + # Returns all workspace paths that should be indexed, excluding directories that we don't need to descend into such + # as `.git`, `node_modules`. Also includes any top level Ruby files + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:42 + sig { returns(T::Array[String]) } + def workspace_paths; end + + private + + # Searches for the latest installation of the `rbs` gem and adds the paths for the core and stdlib RBS definitions + # to the list of paths. This method does not require `rbs` to be a part of the bundle. It searches for whatever + # latest installation of `rbs` exists in the system and fails silently if we can't find one + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:89 + sig { params(paths: T::Array[String]).void } + def add_core_rbs_definition_paths(paths); end + + # Gathers the paths we have to index for all workspace dependencies + # + # pkg:gem/rubydex#lib/rubydex/graph.rb:65 + sig { params(paths: T::Array[String]).void } + def add_workspace_dependency_paths(paths); end +end + +# pkg:gem/rubydex#lib/rubydex/graph.rb:8 +Rubydex::Graph::IGNORED_DIRECTORIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubydex#lib/rubydex/graph.rb:20 +Rubydex::Graph::INDEXABLE_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# Represents `include SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:15 +class Rubydex::Include < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::InstanceVariable < ::Rubydex::Declaration + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[T.untyped]) } + def references; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::InstanceVariableDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex/failures.rb:14 +class Rubydex::IntegrityFailure < ::Rubydex::Failure; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Keyword + # pkg:gem/rubydex#lib/rubydex/keyword.rb:12 + sig { params(name: String, documentation: String).void } + def initialize(name, documentation); end + + # pkg:gem/rubydex#lib/rubydex/keyword.rb:9 + sig { returns(String) } + def documentation; end + + # pkg:gem/rubydex#lib/rubydex/keyword.rb:6 + sig { returns(String) } + def name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::KeywordParameter + # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:9 + sig { params(name: String).void } + def initialize(name); end + + # pkg:gem/rubydex#lib/rubydex/keyword_parameter.rb:6 + sig { returns(String) } + def name; end +end + +# A zero based internal location. Intended to be used for tool-to-tool communication, such as a language server +# communicating with an editor. +# +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Location + include ::Comparable + + # pkg:gem/rubydex#lib/rubydex/location.rb:18 + sig { params(uri: String, start_line: Integer, end_line: Integer, start_column: Integer, end_column: Integer).void } + def initialize(uri:, start_line:, end_line:, start_column:, end_column:); end + + # pkg:gem/rubydex#lib/rubydex/location.rb:38 + sig { params(other: T.untyped).returns(T.nilable(Integer)) } + def <=>(other); end + + # pkg:gem/rubydex#lib/rubydex/location.rb:45 + sig { returns([String, Integer, Integer, Integer, Integer]) } + def comparable_values; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def end_column; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def end_line; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def start_column; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:15 + sig { returns(Integer) } + def start_line; end + + # Turns this zero based location into a one based location for display purposes. + # + # pkg:gem/rubydex#lib/rubydex/location.rb:52 + sig { returns(Rubydex::DisplayLocation) } + def to_display; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:27 + sig { returns(String) } + def to_file_path; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:63 + sig { returns(String) } + def to_s; end + + # pkg:gem/rubydex#lib/rubydex/location.rb:12 + sig { returns(String) } + def uri; end +end + +# pkg:gem/rubydex#lib/rubydex/location.rb:7 +class Rubydex::Location::NotFileUriError < ::StandardError; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Method < ::Rubydex::Declaration + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::MethodReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::MethodAliasDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:11 + def signatures; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::MethodDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:11 + def signatures; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::MethodReference < ::Rubydex::Reference + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(Rubydex::Location) } + def location; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def name; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::Declaration)) } + def receiver; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::MethodVisibilityDefinition < ::Rubydex::Definition; end + +# pkg:gem/rubydex#lib/rubydex/mixin.rb:4 +class Rubydex::Mixin + abstract! + + # pkg:gem/rubydex#lib/rubydex/mixin.rb:9 + sig { params(constant_reference: Rubydex::ConstantReference).void } + def initialize(constant_reference); end + + # pkg:gem/rubydex#lib/rubydex/mixin.rb:6 + def constant_reference; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Module < ::Rubydex::Namespace + include ::Rubydex::Visibility + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def visibility; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ModuleDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Namespace < ::Rubydex::Declaration + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Namespace]) } + def ancestors; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Namespace]) } + def descendants; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def find_member(*_arg0); end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:25 + sig { params(ancestor_names: String).returns(T::Boolean) } + def has_ancestor?(*ancestor_names); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { params(name: String).returns(T.nilable(Rubydex::Declaration)) } + def member(name); end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::Declaration]) } + def members; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Enumerable[Rubydex::ConstantReference]) } + def references; end + + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T.nilable(Rubydex::SingletonClass)) } + def singleton_class; end +end + +# Represents `prepend SomeModule` +# +# pkg:gem/rubydex#lib/rubydex/mixin.rb:18 +class Rubydex::Prepend < ::Rubydex::Mixin; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Reference + abstract! + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def initialize(_arg0, _arg1); end + + # pkg:gem/rubydex#lib/rubydex/reference.rb:6 + def location; end + + class << self + private + + # pkg:gem/rubydex#lib/rubydex.rb:11 + def new(*args); end + end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::ResolvedConstantReference < ::Rubydex::ConstantReference + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(Rubydex::Declaration) } + def declaration; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature + # pkg:gem/rubydex#lib/rubydex/signature.rb:33 + def initialize(parameters); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:128 + def block_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:38 + def deconstruct; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:80 + def deconstruct_keys(keys); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:125 + def forward_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:116 + def keyword_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:119 + def optional_keyword_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:107 + def optional_positional_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:30 + def parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:104 + def positional_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:113 + def post_parameters; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:122 + def rest_keyword_parameter; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:110 + def rest_positional_parameter; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::BlockParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex/signature.rb:66 +Rubydex::Signature::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::ForwardParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::KeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::OptionalKeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::OptionalPositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::Parameter + # pkg:gem/rubydex#lib/rubydex/signature.rb:13 + def initialize(name, location); end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:10 + def location; end + + # pkg:gem/rubydex#lib/rubydex/signature.rb:7 + def name; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::PositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::PostParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::RestKeywordParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Signature::RestPositionalParameter < ::Rubydex::Signature::Parameter; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::SingletonClass < ::Rubydex::Namespace + # pkg:gem/rubydex#lib/rubydex/declaration.rb:40 + sig { returns(Rubydex::Declaration) } + def attached_class; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::SingletonClassDefinition < ::Rubydex::Definition + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(T::Array[Rubydex::Mixin]) } + def mixins; end +end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::Todo < ::Rubydex::Namespace; end + +# pkg:gem/rubydex#lib/rubydex.rb:11 +class Rubydex::UnresolvedConstantReference < ::Rubydex::ConstantReference + # pkg:gem/rubydex#lib/rubydex.rb:11 + sig { returns(String) } + def name; end +end + +# pkg:gem/rubydex#lib/rubydex/version.rb:4 +Rubydex::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubydex#lib/rubydex/declaration.rb:4 +module Rubydex::Visibility + # pkg:gem/rubydex#lib/rubydex/declaration.rb:9 + def private?; end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:12 + def protected?; end + + # pkg:gem/rubydex#lib/rubydex/declaration.rb:6 + def public?; end +end diff --git a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi b/sorbet/rbi/gems/simplecov-html@0.12.3.rbi deleted file mode 100644 index 4053d474..00000000 --- a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +++ /dev/null @@ -1,89 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `simplecov-html` gem. -# Please instead update this file by running `bin/tapioca gem simplecov-html`. - -module SimpleCov - extend ::SimpleCov::Configuration - - class << self - def at_exit_behavior; end - def clear_result; end - def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end - def exit_and_report_previous_error(exit_status); end - def exit_status_from_exception; end - def external_at_exit; end - def external_at_exit=(_arg0); end - def external_at_exit?; end - def filtered(files); end - def final_result_process?; end - def grouped(files); end - def load_adapter(name); end - def load_profile(name); end - def pid; end - def pid=(_arg0); end - def previous_error?(error_exit_status); end - def process_result(result); end - def process_results_and_report_error; end - def ready_to_process_results?; end - def result; end - def result?; end - def result_exit_status(result); end - def round_coverage(coverage); end - def run_exit_tasks!; end - def running; end - def running=(_arg0); end - def start(profile = T.unsafe(nil), &block); end - def wait_for_other_processes; end - def write_last_run(result); end - - private - - def adapt_coverage_result; end - def add_not_loaded_files(result); end - def initial_setup(profile, &block); end - def lookup_corresponding_ruby_coverage_name(criterion); end - def make_parallel_tests_available; end - def probably_running_parallel_tests?; end - def process_coverage_result; end - def remove_useless_results; end - def result_with_not_loaded_files; end - def start_coverage_measurement; end - def start_coverage_with_criteria; end - end -end - -module SimpleCov::Formatter - class << self - def from_env(env); end - end -end - -class SimpleCov::Formatter::HTMLFormatter - def initialize; end - - def branchable_result?; end - def format(result); end - def line_status?(source_file, line); end - def output_message(result); end - - private - - def asset_output_path; end - def assets_path(name); end - def coverage_css_class(covered_percent); end - def covered_percent(percent); end - def formatted_file_list(title, source_files); end - def formatted_source_file(source_file); end - def id(source_file); end - def link_to_source_file(source_file); end - def output_path; end - def shortened_filename(source_file); end - def strength_css_class(covered_strength); end - def template(name); end - def timeago(time); end -end - -SimpleCov::Formatter::HTMLFormatter::VERSION = T.let(T.unsafe(nil), String) -SimpleCov::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/simplecov-html@0.13.2.rbi b/sorbet/rbi/gems/simplecov-html@0.13.2.rbi new file mode 100644 index 00000000..44835e55 --- /dev/null +++ b/sorbet/rbi/gems/simplecov-html@0.13.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `simplecov-html` gem. +# Please instead update this file by running `bin/tapioca gem simplecov-html`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/simplecov@0.21.2.rbi b/sorbet/rbi/gems/simplecov@0.21.2.rbi deleted file mode 100644 index 815dbc7d..00000000 --- a/sorbet/rbi/gems/simplecov@0.21.2.rbi +++ /dev/null @@ -1,577 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `simplecov` gem. -# Please instead update this file by running `bin/tapioca gem simplecov`. - -module SimpleCov - extend ::SimpleCov::Configuration - - class << self - def at_exit_behavior; end - def clear_result; end - def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end - def exit_and_report_previous_error(exit_status); end - def exit_status_from_exception; end - def external_at_exit; end - def external_at_exit=(_arg0); end - def external_at_exit?; end - def filtered(files); end - def final_result_process?; end - def grouped(files); end - def load_adapter(name); end - def load_profile(name); end - def pid; end - def pid=(_arg0); end - def previous_error?(error_exit_status); end - def process_result(result); end - def process_results_and_report_error; end - def ready_to_process_results?; end - def result; end - def result?; end - def result_exit_status(result); end - def round_coverage(coverage); end - def run_exit_tasks!; end - def running; end - def running=(_arg0); end - def start(profile = T.unsafe(nil), &block); end - def wait_for_other_processes; end - def write_last_run(result); end - - private - - def adapt_coverage_result; end - def add_not_loaded_files(result); end - def initial_setup(profile, &block); end - def lookup_corresponding_ruby_coverage_name(criterion); end - def make_parallel_tests_available; end - def probably_running_parallel_tests?; end - def process_coverage_result; end - def remove_useless_results; end - def result_with_not_loaded_files; end - def start_coverage_measurement; end - def start_coverage_with_criteria; end - end -end - -class SimpleCov::ArrayFilter < ::SimpleCov::Filter - def initialize(filter_argument); end - - def matches?(source_files_list); end -end - -class SimpleCov::BlockFilter < ::SimpleCov::Filter - def matches?(source_file); end -end - -module SimpleCov::Combine - private - - def combine(combiner_module, coverage_a, coverage_b); end - def empty_coverage?(coverage_a, coverage_b); end - def existing_coverage(coverage_a, coverage_b); end - - class << self - def combine(combiner_module, coverage_a, coverage_b); end - def empty_coverage?(coverage_a, coverage_b); end - def existing_coverage(coverage_a, coverage_b); end - end -end - -module SimpleCov::Combine::BranchesCombiner - private - - def combine(coverage_a, coverage_b); end - - class << self - def combine(coverage_a, coverage_b); end - end -end - -module SimpleCov::Combine::FilesCombiner - private - - def combine(coverage_a, coverage_b); end - - class << self - def combine(coverage_a, coverage_b); end - end -end - -module SimpleCov::Combine::LinesCombiner - private - - def combine(coverage_a, coverage_b); end - def merge_line_coverage(first_val, second_val); end - - class << self - def combine(coverage_a, coverage_b); end - def merge_line_coverage(first_val, second_val); end - end -end - -module SimpleCov::Combine::ResultsCombiner - private - - def combine(*results); end - def combine_file_coverage(coverage_a, coverage_b); end - def combine_result_sets(combined_results, result); end - - class << self - def combine(*results); end - def combine_file_coverage(coverage_a, coverage_b); end - def combine_result_sets(combined_results, result); end - end -end - -module SimpleCov::CommandGuesser - class << self - def guess; end - def original_run_command; end - def original_run_command=(_arg0); end - - private - - def from_command_line_options; end - def from_defined_constants; end - def from_env; end - end -end - -module SimpleCov::Configuration - def adapters; end - def add_filter(filter_argument = T.unsafe(nil), &filter_proc); end - def add_group(group_name, filter_argument = T.unsafe(nil), &filter_proc); end - def at_exit(&block); end - def at_fork(&block); end - def branch_coverage?; end - def branch_coverage_supported?; end - def clear_coverage_criteria; end - def command_name(name = T.unsafe(nil)); end - def configure(&block); end - def coverage_criteria; end - def coverage_criterion(criterion = T.unsafe(nil)); end - def coverage_criterion_enabled?(criterion); end - def coverage_dir(dir = T.unsafe(nil)); end - def coverage_path; end - def coverage_start_arguments_supported?; end - def enable_coverage(criterion); end - def enable_for_subprocesses(value = T.unsafe(nil)); end - def enabled_for_subprocesses?; end - def filters; end - def filters=(_arg0); end - def formatter(formatter = T.unsafe(nil)); end - def formatter=(_arg0); end - def formatters; end - def formatters=(formatters); end - def groups; end - def groups=(_arg0); end - def maximum_coverage_drop(coverage_drop = T.unsafe(nil)); end - def merge_timeout(seconds = T.unsafe(nil)); end - def minimum_coverage(coverage = T.unsafe(nil)); end - def minimum_coverage_by_file(coverage = T.unsafe(nil)); end - def nocov_token(nocov_token = T.unsafe(nil)); end - def primary_coverage(criterion = T.unsafe(nil)); end - def print_error_status; end - def print_error_status=(_arg0); end - def profiles; end - def project_name(new_name = T.unsafe(nil)); end - def raise_on_invalid_coverage(coverage, coverage_setting); end - def refuse_coverage_drop(*criteria); end - def root(root = T.unsafe(nil)); end - def skip_token(nocov_token = T.unsafe(nil)); end - def track_files(glob); end - def tracked_files; end - def use_merging(use = T.unsafe(nil)); end - - private - - def minimum_possible_coverage_exceeded(coverage_option); end - def parse_filter(filter_argument = T.unsafe(nil), &filter_proc); end - def raise_if_criterion_disabled(criterion); end - def raise_if_criterion_unsupported(criterion); end -end - -SimpleCov::Configuration::DEFAULT_COVERAGE_CRITERION = T.let(T.unsafe(nil), Symbol) -SimpleCov::Configuration::SUPPORTED_COVERAGE_CRITERIA = T.let(T.unsafe(nil), Array) - -class SimpleCov::CoverageStatistics - def initialize(covered:, missed:, total_strength: T.unsafe(nil)); end - - def covered; end - def missed; end - def percent; end - def strength; end - def total; end - - private - - def compute_percent(covered, missed, total); end - def compute_strength(total_strength, total); end - - class << self - def from(coverage_statistics); end - end -end - -module SimpleCov::ExitCodes; end -SimpleCov::ExitCodes::EXCEPTION = T.let(T.unsafe(nil), Integer) - -module SimpleCov::ExitCodes::ExitCodeHandling - private - - def call(result, coverage_limits:); end - def coverage_checks(result, coverage_limits); end - - class << self - def call(result, coverage_limits:); end - def coverage_checks(result, coverage_limits); end - end -end - -SimpleCov::ExitCodes::MAXIMUM_COVERAGE_DROP = T.let(T.unsafe(nil), Integer) -SimpleCov::ExitCodes::MINIMUM_COVERAGE = T.let(T.unsafe(nil), Integer) - -class SimpleCov::ExitCodes::MaximumCoverageDropCheck - def initialize(result, maximum_coverage_drop); end - - def exit_code; end - def failing?; end - def report; end - - private - - def compute_coverage_drop_data; end - def coverage_drop_violations; end - def drop_percent(criterion); end - def last_coverage(criterion); end - def last_run; end - def maximum_coverage_drop; end - def result; end -end - -SimpleCov::ExitCodes::MaximumCoverageDropCheck::MAX_DROP_ACCURACY = T.let(T.unsafe(nil), Integer) - -class SimpleCov::ExitCodes::MinimumCoverageByFileCheck - def initialize(result, minimum_coverage_by_file); end - - def exit_code; end - def failing?; end - def report; end - - private - - def compute_minimum_coverage_data; end - def minimum_coverage_by_file; end - def minimum_violations; end - def result; end -end - -class SimpleCov::ExitCodes::MinimumOverallCoverageCheck - def initialize(result, minimum_coverage); end - - def exit_code; end - def failing?; end - def report; end - - private - - def calculate_minimum_violations; end - def minimum_coverage; end - def minimum_violations; end - def result; end -end - -SimpleCov::ExitCodes::SUCCESS = T.let(T.unsafe(nil), Integer) - -class SimpleCov::FileList - include ::Enumerable - extend ::Forwardable - - def initialize(files); end - - def branch_covered_percent; end - def count(*args, **_arg1_arg1, &block); end - def coverage_statistics; end - def coverage_statistics_by_file; end - def covered_branches; end - def covered_lines; end - def covered_percent; end - def covered_percentages; end - def covered_strength; end - def each(*args, **_arg1_arg1, &block); end - def empty?(*args, **_arg1_arg1, &block); end - def least_covered_file; end - def length(*args, **_arg1_arg1, &block); end - def lines_of_code; end - def map(*args, **_arg1_arg1, &block); end - def missed_branches; end - def missed_lines; end - def never_lines; end - def size(*args, **_arg1_arg1, &block); end - def skipped_lines; end - def to_a(*args, **_arg1_arg1, &block); end - def to_ary(*args, **_arg1_arg1, &block); end - def total_branches; end - - private - - def compute_coverage_statistics; end - def compute_coverage_statistics_by_file; end -end - -class SimpleCov::Filter - def initialize(filter_argument); end - - def filter_argument; end - def matches?(_source_file); end - def passes?(source_file); end - - class << self - def build_filter(filter_argument); end - def class_for_argument(filter_argument); end - end -end - -module SimpleCov::Formatter - class << self - def from_env(env); end - end -end - -class SimpleCov::Formatter::MultiFormatter - class << self - def [](*args); end - def new(formatters = T.unsafe(nil)); end - end -end - -module SimpleCov::Formatter::MultiFormatter::InstanceMethods - def format(result); end -end - -class SimpleCov::Formatter::SimpleFormatter - def format(result); end -end - -module SimpleCov::LastRun - class << self - def last_run_path; end - def read; end - def write(json); end - end -end - -class SimpleCov::LinesClassifier - def classify(lines); end - - class << self - def no_cov_line; end - def no_cov_line?(line); end - def whitespace_line?(line); end - end -end - -SimpleCov::LinesClassifier::COMMENT_LINE = T.let(T.unsafe(nil), Regexp) -SimpleCov::LinesClassifier::RELEVANT = T.let(T.unsafe(nil), Integer) -SimpleCov::LinesClassifier::WHITESPACE_LINE = T.let(T.unsafe(nil), Regexp) -SimpleCov::LinesClassifier::WHITESPACE_OR_COMMENT_LINE = T.let(T.unsafe(nil), Regexp) - -class SimpleCov::Profiles < ::Hash - def define(name, &blk); end - def load(name); end -end - -class SimpleCov::RegexFilter < ::SimpleCov::Filter - def matches?(source_file); end -end - -class SimpleCov::Result - extend ::Forwardable - - def initialize(original_result, command_name: T.unsafe(nil), created_at: T.unsafe(nil)); end - - def command_name; end - def command_name=(_arg0); end - def coverage_statistics(*args, **_arg1_arg1, &block); end - def coverage_statistics_by_file(*args, **_arg1_arg1, &block); end - def covered_branches(*args, **_arg1_arg1, &block); end - def covered_lines(*args, **_arg1_arg1, &block); end - def covered_percent(*args, **_arg1_arg1, &block); end - def covered_percentages(*args, **_arg1_arg1, &block); end - def covered_strength(*args, **_arg1_arg1, &block); end - def created_at; end - def created_at=(_arg0); end - def filenames; end - def files; end - def format!; end - def groups; end - def least_covered_file(*args, **_arg1_arg1, &block); end - def missed_branches(*args, **_arg1_arg1, &block); end - def missed_lines(*args, **_arg1_arg1, &block); end - def original_result; end - def source_files; end - def to_hash; end - def total_branches(*args, **_arg1_arg1, &block); end - def total_lines(*args, **_arg1_arg1, &block); end - - private - - def coverage; end - def filter!; end - - class << self - def from_hash(hash); end - end -end - -class SimpleCov::ResultAdapter - def initialize(result); end - - def adapt; end - def result; end - - class << self - def call(*args); end - end -end - -module SimpleCov::ResultMerger - class << self - def adapt_pre_simplecov_0_18_result(result); end - def adapt_result(result); end - def create_result(command_names, coverage); end - def merge_and_store(*file_paths, ignore_timeout: T.unsafe(nil)); end - def merge_coverage(*results); end - def merge_results(*file_paths, ignore_timeout: T.unsafe(nil)); end - def merge_valid_results(results, ignore_timeout: T.unsafe(nil)); end - def merged_result; end - def parse_file(path); end - def parse_json(content); end - def pre_simplecov_0_18_result?(result); end - def read_file(path); end - def read_resultset; end - def resultset_path; end - def resultset_writelock; end - def store_result(result); end - def synchronize_resultset; end - def time_since_result_creation(data); end - def valid_results(file_path, ignore_timeout: T.unsafe(nil)); end - def within_merge_timeout?(data); end - end -end - -module SimpleCov::SimulateCoverage - private - - def call(absolute_path); end - - class << self - def call(absolute_path); end - end -end - -class SimpleCov::SourceFile - def initialize(filename, coverage_data); end - - def branches; end - def branches_coverage_percent; end - def branches_for_line(line_number); end - def branches_report; end - def coverage_data; end - def coverage_statistics; end - def covered_branches; end - def covered_lines; end - def covered_percent; end - def covered_strength; end - def filename; end - def line(number); end - def line_with_missed_branch?(line_number); end - def lines; end - def lines_of_code; end - def missed_branches; end - def missed_lines; end - def never_lines; end - def no_branches?; end - def no_lines?; end - def project_filename; end - def relevant_lines; end - def skipped_lines; end - def source; end - def source_lines; end - def src; end - def total_branches; end - - private - - def branch_coverage_statistics; end - def build_branch(branch_data, hit_count, condition_start_line); end - def build_branches; end - def build_branches_from(condition, branches); end - def build_branches_report; end - def build_lines; end - def build_no_cov_chunks; end - def coverage_exceeding_source_warn; end - def ensure_remove_undefs(file_lines); end - def line_coverage_statistics; end - def lines_strength; end - def load_source; end - def no_cov_chunks; end - def process_skipped_branches(branches); end - def process_skipped_lines(lines); end - def read_lines(file, lines, current_line); end - def restore_ruby_data_structure(structure); end - def set_encoding_based_on_magic_comment(file, line); end - def shebang?(line); end -end - -class SimpleCov::SourceFile::Branch - def initialize(start_line:, end_line:, coverage:, inline:, type:); end - - def coverage; end - def covered?; end - def end_line; end - def inline?; end - def missed?; end - def overlaps_with?(line_range); end - def report; end - def report_line; end - def skipped!; end - def skipped?; end - def start_line; end - def type; end -end - -class SimpleCov::SourceFile::Line - def initialize(src, line_number, coverage); end - - def coverage; end - def covered?; end - def line; end - def line_number; end - def missed?; end - def never?; end - def number; end - def skipped; end - def skipped!; end - def skipped?; end - def source; end - def src; end - def status; end -end - -SimpleCov::SourceFile::RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) -SimpleCov::SourceFile::SHEBANG_REGEX = T.let(T.unsafe(nil), Regexp) - -class SimpleCov::StringFilter < ::SimpleCov::Filter - def matches?(source_file); end -end - -module SimpleCov::UselessResultsRemover - class << self - def call(coverage_result); end - def root_regx; end - end -end - -SimpleCov::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/simplecov@0.22.0.rbi b/sorbet/rbi/gems/simplecov@0.22.0.rbi new file mode 100644 index 00000000..1958acbc --- /dev/null +++ b/sorbet/rbi/gems/simplecov@0.22.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `simplecov` gem. +# Please instead update this file by running `bin/tapioca gem simplecov`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi b/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi similarity index 76% rename from sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi rename to sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi index 0b419841..62132531 100644 --- a/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +++ b/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `simplecov_json_formatter` gem. # Please instead update this file by running `bin/tapioca gem simplecov_json_formatter`. + # THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/spoom@1.1.7.rbi b/sorbet/rbi/gems/spoom@1.1.7.rbi deleted file mode 100644 index dd219b6e..00000000 --- a/sorbet/rbi/gems/spoom@1.1.7.rbi +++ /dev/null @@ -1,1252 +0,0 @@ -# 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`. - -module Spoom - class << self - sig { params(cmd: String, arg: String, path: String, capture_err: T::Boolean).returns([String, T::Boolean, Integer]) } - def exec(cmd, *arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end - end -end - -module Spoom::Cli; end - -class Spoom::Cli::Bump < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - sig { params(directory: String).void } - def bump(directory = T.unsafe(nil)); end - - def config_files(path: T.unsafe(nil)); end - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - def undo_changes(files, from_strictness); end -end - -class Spoom::Cli::Config < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def show; end -end - -class Spoom::Cli::Coverage < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def bundle_install(path, sha); end - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def message_no_data(file); end - def open(file = T.unsafe(nil)); end - def parse_time(string, option); end - def report; end - def snapshot; end - def timeline; end -end - -Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) - -module Spoom::Cli::Helper - include ::Spoom::Colorize - - sig { params(string: String).returns(String) } - def blue(string); end - - sig { params(exit_code: Integer, block: T.nilable(T.proc.void)).void } - def check_sorbet_segfault(exit_code, &block); end - - sig { returns(T::Boolean) } - def color?; end - - sig { params(string: String, color: Spoom::Color).returns(String) } - def colorize(string, *color); end - - sig { params(string: String).returns(String) } - def cyan(string); end - - sig { returns(String) } - def exec_path; end - - sig { params(string: String).returns(String) } - def gray(string); end - - sig { params(string: String).returns(String) } - def green(string); end - - sig { params(string: String).returns(String) } - def highlight(string); end - - sig { void } - def in_sorbet_project!; end - - sig { returns(T::Boolean) } - def in_sorbet_project?; end - - sig { params(string: String).returns(String) } - def red(string); end - - sig { params(message: String).void } - def say(message); end - - 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 - - sig { returns(Spoom::Sorbet::Config) } - def sorbet_config; end - - sig { returns(String) } - def sorbet_config_file; end - - sig { params(string: String).returns(String) } - def yellow(string); end -end - -class Spoom::Cli::LSP < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def defs(file, line, col); end - def find(query); end - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def hover(file, line, col); end - def list; end - def lsp_client; end - def refs(file, line, col); end - def run(&block); end - def show; end - def sigs(file, line, col); end - def symbol_printer; end - def symbols(file); end - def to_uri(path); end - def types(file, line, col); end -end - -class Spoom::Cli::Main < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def __print_version; end - def bump(*args); end - def config(*args); end - def coverage(*args); end - def files; end - def lsp(*args); end - def tc(*args); end - - class << self - def exit_on_failure?; end - end -end - -class Spoom::Cli::Run < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def colorize_message(message); end - def format_error(error, format); end - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def tc(*arg); end -end - -Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) -Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) -Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) -Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) - -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 - - sig { returns(String) } - def ansi_code; end -end - -module Spoom::Colorize - sig { params(string: String, color: Spoom::Color).returns(String) } - def set_color(string, *color); end -end - -module Spoom::Coverage - class << self - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], palette: Spoom::Coverage::D3::ColorPalette, path: String).returns(Spoom::Coverage::Report) } - def report(snapshots, palette:, path: T.unsafe(nil)); end - - sig { params(path: String).returns(Spoom::FileTree) } - def sigils_tree(path: T.unsafe(nil)); end - - sig { params(path: String, rbi: T::Boolean, sorbet_bin: T.nilable(String)).returns(Spoom::Coverage::Snapshot) } - def snapshot(path: T.unsafe(nil), rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - sig { params(path: String).returns(Spoom::Sorbet::Config) } - def sorbet_config(path: T.unsafe(nil)); end - end -end - -module Spoom::Coverage::Cards; end - -class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template - 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 - - def body; end - - sig { returns(T.nilable(String)) } - def title; end -end - -Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) - -class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card - abstract! - - sig { void } - def initialize; end - - sig { abstract.returns(String) } - def erb; end - - sig { override.returns(String) } - def html; end -end - -class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card - sig { params(sigils_tree: Spoom::FileTree, title: String).void } - def initialize(sigils_tree:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card - sig { params(snapshot: Spoom::Coverage::Snapshot, title: String).void } - def initialize(snapshot:, title: T.unsafe(nil)); end - - sig { returns(Spoom::Coverage::D3::Pie::Calls) } - def pie_calls; end - - sig { returns(Spoom::Coverage::D3::Pie::Sigils) } - def pie_sigils; end - - sig { returns(Spoom::Coverage::D3::Pie::Sigs) } - def pie_sigs; end - - sig { returns(Spoom::Coverage::Snapshot) } - def snapshot; end -end - -Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) - -class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb - 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 - - sig { override.returns(String) } - def erb; end -end - -class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card - sig { params(title: String, timeline: Spoom::Coverage::D3::Timeline).void } - def initialize(title:, timeline:); end -end - -class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline - sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -module Spoom::Coverage::D3 - class << self - sig { params(palette: Spoom::Coverage::D3::ColorPalette).returns(String) } - def header_script(palette); end - - sig { returns(String) } - def header_style; end - end -end - -class Spoom::Coverage::D3::Base - abstract! - - sig { params(id: String, data: T.untyped).void } - def initialize(id, data); end - - sig { returns(String) } - def html; end - - sig { returns(String) } - def id; end - - sig { abstract.returns(String) } - def script; end - - sig { returns(String) } - def tooltip; end - - class << self - sig { returns(String) } - def header_script; end - - sig { returns(String) } - def header_style; end - end -end - -Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) -Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) -Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) -Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) -Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) - -class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base - sig { override.returns(String) } - def script; end - - class << self - sig { returns(String) } - def header_script; end - - sig { returns(String) } - def header_style; end - end -end - -class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap - sig { params(id: String, sigils_tree: Spoom::FileTree).void } - def initialize(id, sigils_tree); end - - sig { params(node: Spoom::FileTree::Node).returns(Float) } - def tree_node_score(node); end - - sig { params(node: Spoom::FileTree::Node).returns(T.nilable(String)) } - def tree_node_strictness(node); end - - sig { params(node: Spoom::FileTree::Node).returns(T::Hash[Symbol, T.untyped]) } - def tree_node_to_json(node); end -end - -class Spoom::Coverage::D3::ColorPalette < ::T::Struct - prop :false, String - prop :ignore, String - prop :strict, String - prop :strong, String - prop :true, String - - class << self - def inherited(s); end - end -end - -class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base - abstract! - - sig { params(id: String, title: String, data: T.untyped).void } - def initialize(id, title, data); end - - sig { override.returns(String) } - def script; end - - class << self - sig { returns(String) } - def header_script; end - - sig { returns(String) } - def header_style; end - end -end - -class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie - sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie - sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie - sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base - abstract! - - sig { params(id: String, data: T.untyped, keys: T::Array[String]).void } - def initialize(id, data, keys); end - - sig { params(y: String, color: String, curve: String).returns(String) } - def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - sig { params(y: String, color: String, curve: String).returns(String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - sig { abstract.returns(String) } - def plot; end - - sig { params(y: String).returns(String) } - def points(y:); end - - sig { override.returns(String) } - def script; end - - sig { returns(String) } - def x_scale; end - - sig { returns(String) } - def x_ticks; end - - sig { params(min: String, max: String, ticks: String).returns(String) } - def y_scale(min:, max:, ticks:); end - - sig { params(ticks: String, format: String, padding: Integer).returns(String) } - def y_ticks(ticks:, format:, padding:); end - - class << self - sig { returns(String) } - def header_script; end - - sig { returns(String) } - def header_style; end - end -end - -class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.params(y: String, color: String, curve: String).returns(String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - sig { override.returns(String) } - def plot; end - - sig { override.returns(String) } - def script; end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.returns(String) } - def plot; end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline - abstract! - - def initialize(*args, **_arg1_arg1, &blk); end - - sig { override.params(y: String, color: String, curve: String).returns(String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - sig { override.returns(String) } - def plot; end - - sig { override.returns(String) } - def script; end -end - -class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline - sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - sig { override.returns(String) } - def plot; end - - sig { override.returns(String) } - def tooltip; end -end - -class Spoom::Coverage::Page < ::Spoom::Coverage::Template - abstract! - - sig { params(title: String, palette: Spoom::Coverage::D3::ColorPalette, template: String).void } - def initialize(title:, palette:, template: T.unsafe(nil)); end - - sig { returns(String) } - def body_html; end - - sig { abstract.returns(T::Array[Spoom::Coverage::Cards::Card]) } - def cards; end - - sig { returns(String) } - def footer_html; end - - sig { returns(String) } - def header_html; end - - sig { returns(String) } - def header_script; end - - sig { returns(String) } - def header_style; end - - sig { returns(Spoom::Coverage::D3::ColorPalette) } - def palette; end - - sig { returns(String) } - def title; end -end - -Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) - -class Spoom::Coverage::Report < ::Spoom::Coverage::Page - sig { params(project_name: String, palette: Spoom::Coverage::D3::ColorPalette, snapshots: T::Array[Spoom::Coverage::Snapshot], sigils_tree: Spoom::FileTree, sorbet_intro_commit: T.nilable(String), sorbet_intro_date: T.nilable(Time)).void } - def initialize(project_name:, palette:, snapshots:, sigils_tree:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - - sig { override.returns(T::Array[Spoom::Coverage::Cards::Card]) } - def cards; end - - sig { override.returns(String) } - def header_html; end - - sig { returns(String) } - def project_name; end - - sig { returns(Spoom::FileTree) } - def sigils_tree; end - - sig { returns(T::Array[Spoom::Coverage::Snapshot]) } - def snapshots; end - - sig { returns(T.nilable(String)) } - def sorbet_intro_commit; end - - sig { returns(T.nilable(Time)) } - def sorbet_intro_date; end -end - -class Spoom::Coverage::Snapshot < ::T::Struct - prop :calls_typed, Integer, default: T.unsafe(nil) - prop :calls_untyped, Integer, default: T.unsafe(nil) - prop :classes, 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 :duration, Integer, default: T.unsafe(nil) - prop :files, Integer, default: T.unsafe(nil) - prop :methods_with_sig, Integer, default: T.unsafe(nil) - prop :methods_without_sig, Integer, default: T.unsafe(nil) - prop :modules, Integer, default: T.unsafe(nil) - prop :rbi_files, Integer, default: T.unsafe(nil) - prop :sigils, T::Hash[String, Integer], default: T.unsafe(nil) - prop :singleton_classes, Integer, default: T.unsafe(nil) - prop :timestamp, Integer, default: T.unsafe(nil) - prop :version_runtime, T.nilable(String), default: T.unsafe(nil) - prop :version_static, T.nilable(String), default: T.unsafe(nil) - - 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 - - sig { params(arg: T.untyped).returns(String) } - def to_json(*arg); end - - class << self - sig { params(json: String).returns(Spoom::Coverage::Snapshot) } - def from_json(json); end - - sig { params(obj: T::Hash[String, T.untyped]).returns(Spoom::Coverage::Snapshot) } - def from_obj(obj); end - - def inherited(s); end - end -end - -Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) - -class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer - sig { params(snapshot: Spoom::Coverage::Snapshot).void } - def print_snapshot(snapshot); end - - private - - sig { params(value: T.nilable(Integer), total: T.nilable(Integer)).returns(String) } - def percent(value, total); end - - sig { params(hash: T::Hash[String, Integer], total: Integer).void } - def print_map(hash, total); end -end - -class Spoom::Coverage::Template - abstract! - - sig { params(template: String).void } - def initialize(template:); end - - sig { returns(String) } - def erb; end - - sig { returns(Binding) } - def get_binding; end - - sig { returns(String) } - def html; end -end - -class Spoom::Error < ::StandardError; end - -class Spoom::FileTree - sig { params(paths: T::Enumerable[String], strip_prefix: T.nilable(String)).void } - def initialize(paths = T.unsafe(nil), strip_prefix: T.unsafe(nil)); end - - sig { params(path: String).returns(Spoom::FileTree::Node) } - def add_path(path); end - - sig { params(paths: T::Enumerable[String]).void } - def add_paths(paths); end - - sig { returns(T::Array[Spoom::FileTree::Node]) } - def nodes; end - - sig { returns(T::Array[String]) } - def paths; end - - sig { params(out: T.any(IO, StringIO), show_strictness: T::Boolean, colors: T::Boolean, indent_level: Integer).void } - def print(out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - sig { returns(T::Array[Spoom::FileTree::Node]) } - def roots; end - - sig { returns(T.nilable(String)) } - def strip_prefix; end - - private - - sig { params(node: Spoom::FileTree::Node, collected_nodes: T::Array[Spoom::FileTree::Node]).returns(T::Array[Spoom::FileTree::Node]) } - def collect_nodes(node, collected_nodes = T.unsafe(nil)); end -end - -class Spoom::FileTree::Node < ::T::Struct - const :children, T::Hash[String, Spoom::FileTree::Node], default: T.unsafe(nil) - const :name, String - const :parent, T.nilable(Spoom::FileTree::Node) - - sig { returns(String) } - def path; end - - class << self - def inherited(s); end - end -end - -class Spoom::FileTree::TreePrinter < ::Spoom::Printer - sig { params(tree: Spoom::FileTree, out: T.any(IO, StringIO), show_strictness: T::Boolean, colors: T::Boolean, indent_level: Integer).void } - def initialize(tree:, out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - sig { params(node: Spoom::FileTree::Node).void } - def print_node(node); end - - sig { params(nodes: T::Array[Spoom::FileTree::Node]).void } - def print_nodes(nodes); end - - sig { void } - def print_tree; end - - sig { returns(Spoom::FileTree) } - def tree; end - - private - - sig { params(node: Spoom::FileTree::Node).returns(T.nilable(String)) } - def node_strictness(node); end - - sig { params(strictness: T.nilable(String)).returns(Spoom::Color) } - def strictness_color(strictness); end -end - -module Spoom::Git - class << self - sig { params(arg: String, path: String).returns([String, String, T::Boolean]) } - def checkout(*arg, path: T.unsafe(nil)); end - - sig { params(sha: String, path: String).returns(T.nilable(Time)) } - def commit_time(sha, path: T.unsafe(nil)); end - - sig { params(sha: String, path: String).returns(T.nilable(Integer)) } - def commit_timestamp(sha, path: T.unsafe(nil)); end - - sig { params(path: String).returns(T.nilable(String)) } - def current_branch(path: T.unsafe(nil)); end - - sig { params(arg: String, path: String).returns([String, String, T::Boolean]) } - def diff(*arg, path: T.unsafe(nil)); end - - sig { params(timestamp: String).returns(Time) } - def epoch_to_time(timestamp); end - - sig { params(command: String, arg: String, path: String).returns([String, String, T::Boolean]) } - def exec(command, *arg, path: T.unsafe(nil)); end - - sig { params(path: String).returns(T.nilable(String)) } - def last_commit(path: T.unsafe(nil)); end - - sig { params(arg: String, path: String).returns([String, String, T::Boolean]) } - def log(*arg, path: T.unsafe(nil)); end - - sig { params(arg: String, path: String).returns([String, String, T::Boolean]) } - def rev_parse(*arg, path: T.unsafe(nil)); end - - sig { params(arg: String, path: String).returns([String, String, T::Boolean]) } - def show(*arg, path: T.unsafe(nil)); end - - sig { params(path: String).returns(T.nilable(String)) } - def sorbet_intro_commit(path: T.unsafe(nil)); end - - sig { params(path: String).returns(T.nilable(String)) } - def sorbet_removal_commit(path: T.unsafe(nil)); end - - sig { params(path: String).returns(T::Boolean) } - def workdir_clean?(path: T.unsafe(nil)); end - end -end - -module Spoom::LSP; end - -class Spoom::LSP::Client - def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end - - def close; end - def definitions(uri, line, column); end - def document_symbols(uri); end - def hover(uri, line, column); end - def next_id; end - def open(workspace_path); end - def read; end - def read_raw; end - def references(uri, line, column, include_decl = T.unsafe(nil)); end - def send(message); end - def send_raw(json_string); end - def signatures(uri, line, column); end - def symbols(query); end - def type_definitions(uri, line, column); end -end - -class Spoom::LSP::Diagnostic < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :code, Integer - const :informations, Object - const :message, String - const :range, Spoom::LSP::Range - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -class Spoom::LSP::DocumentSymbol < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :children, T::Array[Spoom::LSP::DocumentSymbol] - const :detail, T.nilable(String) - const :kind, Integer - const :location, T.nilable(Spoom::LSP::Location) - const :name, String - const :range, T.nilable(Spoom::LSP::Range) - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def kind_string; end - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) -class Spoom::LSP::Error < ::StandardError; end -class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end -class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end - -class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error - def initialize(uri, diagnostics); end - - def diagnostics; end - def uri; end - - class << self - def from_json(json); end - end -end - -class Spoom::LSP::Hover < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :contents, String - const :range, T.nilable(T::Range[T.untyped]) - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -class Spoom::LSP::Location < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :range, Spoom::LSP::Range - const :uri, String - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -class Spoom::LSP::Message - def initialize; end - - def as_json; end - def jsonrpc; end - def to_json(*args); end -end - -class Spoom::LSP::Notification < ::Spoom::LSP::Message - def initialize(method, params); end - - def method; end - def params; end -end - -class Spoom::LSP::Position < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :char, Integer - const :line, Integer - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -module Spoom::LSP::PrintableSymbol - interface! - - sig { abstract.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end -end - -class Spoom::LSP::Range < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :end, Spoom::LSP::Position - const :start, Spoom::LSP::Position - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -class Spoom::LSP::Request < ::Spoom::LSP::Message - def initialize(id, method, params); end - - def id; end - def method; end - def params; end -end - -class Spoom::LSP::ResponseError < ::Spoom::LSP::Error - def initialize(code, message, data); end - - def code; end - def data; end - def message; end - - class << self - def from_json(json); end - end -end - -class Spoom::LSP::SignatureHelp < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :doc, Object - const :label, T.nilable(String) - const :params, T::Array[T.untyped] - - sig { override.params(printer: Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - def to_s; end - - class << self - def from_json(json); end - def inherited(s); end - end -end - -class Spoom::LSP::SymbolPrinter < ::Spoom::Printer - sig { params(out: T.any(IO, StringIO), colors: T::Boolean, indent_level: Integer, prefix: T.nilable(String)).void } - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - - sig { params(uri: String).returns(String) } - def clean_uri(uri); end - - def prefix; end - def prefix=(_arg0); end - - sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void } - def print_list(objects); end - - sig { params(object: T.nilable(Spoom::LSP::PrintableSymbol)).void } - def print_object(object); end - - sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void } - def print_objects(objects); end - - def seen; end - def seen=(_arg0); end -end - -class Spoom::Printer - include ::Spoom::Colorize - - abstract! - - 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 - - sig { params(string: String, color: Spoom::Color).returns(String) } - def colorize(string, *color); end - - sig { void } - def dedent; end - - sig { void } - def indent; end - - sig { returns(T.any(IO, StringIO)) } - def out; end - - def out=(_arg0); end - - sig { params(string: T.nilable(String)).void } - def print(string); end - - sig { params(string: T.nilable(String), color: Spoom::Color).void } - def print_colored(string, *color); end - - sig { params(string: T.nilable(String)).void } - def printl(string); end - - sig { void } - def printn; end - - sig { void } - def printt; end -end - -Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) - -module Spoom::Sorbet - class << self - sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns([String, T::Boolean, Integer]) } - def srb(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - sig { params(config: Spoom::Sorbet::Config, path: String).returns(T::Array[String]) } - def srb_files(config, path: T.unsafe(nil)); end - - sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns(T.nilable(T::Hash[String, Integer])) } - def srb_metrics(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns([String, T::Boolean, Integer]) } - def srb_tc(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns(T.nilable(String)) } - def srb_version(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - sig { params(gem: String, path: String).returns(T.nilable(String)) } - def version_from_gemfile_lock(gem: T.unsafe(nil), path: T.unsafe(nil)); end - end -end - -Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) -Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) - -class Spoom::Sorbet::Config - sig { void } - def initialize; end - - def allowed_extensions; end - - sig { returns(Spoom::Sorbet::Config) } - def copy; end - - def ignore; end - - sig { returns(T::Boolean) } - def no_stdlib; end - - def no_stdlib=(_arg0); end - - sig { returns(String) } - def options_string; end - - sig { returns(T::Array[String]) } - def paths; end - - class << self - sig { params(sorbet_config_path: String).returns(Spoom::Sorbet::Config) } - def parse_file(sorbet_config_path); end - - sig { params(sorbet_config: String).returns(Spoom::Sorbet::Config) } - def parse_string(sorbet_config); end - - private - - sig { params(line: String).returns(String) } - def parse_option(line); end - end -end - -module Spoom::Sorbet::Errors - class << self - 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 - -Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) - -class Spoom::Sorbet::Errors::Error - include ::Comparable - - sig { params(file: T.nilable(String), line: T.nilable(Integer), message: T.nilable(String), code: T.nilable(Integer), more: T::Array[String]).void } - def initialize(file, line, message, code, more = T.unsafe(nil)); end - - sig { params(other: T.untyped).returns(Integer) } - def <=>(other); end - - def code; end - - sig { returns(T.nilable(String)) } - def file; end - - sig { returns(T.nilable(Integer)) } - def line; end - - def message; end - - sig { returns(T::Array[String]) } - def more; end - - sig { returns(String) } - def to_s; end -end - -class Spoom::Sorbet::Errors::Parser - sig { params(error_url_base: String).void } - def initialize(error_url_base: T.unsafe(nil)); end - - sig { params(output: String).returns(T::Array[Spoom::Sorbet::Errors::Error]) } - def parse(output); end - - private - - sig { params(line: String).void } - def append_error(line); end - - sig { void } - def close_error; end - - sig { params(error_url_base: String).returns(Regexp) } - def error_line_match_regexp(error_url_base); end - - sig { params(line: String).returns(T.nilable(Spoom::Sorbet::Errors::Error)) } - def match_error_line(line); end - - sig { params(error: Spoom::Sorbet::Errors::Error).void } - def open_error(error); end - - class << self - 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 - -Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) -Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) - -module Spoom::Sorbet::MetricsParser - class << self - sig { params(path: String, prefix: String).returns(T::Hash[String, Integer]) } - def parse_file(path, prefix = T.unsafe(nil)); end - - sig { params(obj: T::Hash[String, T.untyped], prefix: String).returns(T::Hash[String, Integer]) } - def parse_hash(obj, prefix = T.unsafe(nil)); end - - sig { params(string: String, prefix: String).returns(T::Hash[String, Integer]) } - def parse_string(string, prefix = T.unsafe(nil)); end - end -end - -Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) -Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) - -module Spoom::Sorbet::Sigils - class << self - sig { params(path: T.any(Pathname, String), new_strictness: String).returns(T::Boolean) } - def change_sigil_in_file(path, new_strictness); end - - sig { params(path_list: T::Array[String], new_strictness: String).returns(T::Array[String]) } - def change_sigil_in_files(path_list, new_strictness); end - - sig { params(path: T.any(Pathname, String)).returns(T.nilable(String)) } - def file_strictness(path); end - - sig { params(directory: T.any(Pathname, String), strictness: String, extension: String).returns(T::Array[String]) } - def files_with_sigil_strictness(directory, strictness, extension: T.unsafe(nil)); end - - sig { params(strictness: String).returns(String) } - def sigil_string(strictness); end - - sig { params(content: String).returns(T.nilable(String)) } - def strictness_in_content(content); end - - sig { params(content: String, new_strictness: String).returns(String) } - def update_sigil(content, new_strictness); end - - sig { params(strictness: String).returns(T::Boolean) } - def valid_strictness?(strictness); end - end -end - -Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) -Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) -Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) - -class Spoom::Timeline - sig { params(from: Time, to: Time, path: String).void } - def initialize(from, to, path: T.unsafe(nil)); end - - sig { params(dates: T::Array[Time]).returns(T::Array[String]) } - def commits_for_dates(dates); end - - sig { returns(T::Array[Time]) } - def months; end - - sig { returns(T::Array[String]) } - def ticks; end -end - -Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/spoom@1.7.16.rbi b/sorbet/rbi/gems/spoom@1.7.16.rbi new file mode 100644 index 00000000..459f92cc --- /dev/null +++ b/sorbet/rbi/gems/spoom@1.7.16.rbi @@ -0,0 +1,6209 @@ +# 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`. + + +# 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 `bundle exec spoom srb sigs export`. + +# Copied from https://github.com/rails/rails/blob/main/actionview/lib/action_view/template/handlers/erb/erubi.rb. +# +# Copyright (c) David Heinemeier Hansson +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# where "strictness" represents the level at which Sorbet will report errors +# See https://sorbet.org/docs/static for a more complete explanation +# +# pkg:gem/spoom#lib/spoom.rb:7 +module Spoom + class << self + # pkg:gem/spoom#lib/spoom/parse.rb:11 + sig { params(ruby: ::String, file: ::String).returns([::Prism::Node, T::Array[::Prism::Comment]]) } + def parse_ruby(ruby, file:); end + end +end + +# pkg:gem/spoom#lib/spoom/bundler_helper.rb:5 +module Spoom::BundlerHelper + class << self + # Generate a gem requirement for the given gem name, using that gem's version in the "real" current bundle. + # + # This ensures that any child Spoom::Contexts use predictable gem versions, + # without having to manually specify them and bump them to stay in sync with Spoom's real Gemfile. + # + # Given `"foo"`, returns a string like 'gem "foo", "= 1.2.3"', suitable for inserting into a Gemfile. + # + # pkg:gem/spoom#lib/spoom/bundler_helper.rb:14 + sig { params(gem_name: ::String).returns(::String) } + def gem_requirement_from_real_bundle(gem_name); end + end +end + +# pkg:gem/spoom#lib/spoom/cli/helper.rb:9 +module Spoom::Cli; end + +# pkg:gem/spoom#lib/spoom/cli/deadcode.rb:8 +class Spoom::Cli::Deadcode < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/deadcode.rb:51 + sig { params(paths: ::String).void } + def deadcode(*paths); end + + # pkg:gem/spoom#lib/spoom/cli.rb:71 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/deadcode.rb:153 + def remove(location_string); end +end + +# pkg:gem/spoom#lib/spoom/cli/helper.rb:11 +module Spoom::Cli::Helper + include ::Spoom::Colorize + + requires_ancestor { Thor } + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:146 + sig { params(string: ::String).returns(::String) } + def blue(string); end + + # Collect files from `paths`, defaulting to `exec_path` + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:82 + sig { params(paths: T::Array[::String], include_rbi_files: T::Boolean).returns(T::Array[::String]) } + def collect_files(paths, include_rbi_files: T.unsafe(nil)); end + + # Is the `--color` option true? + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:110 + sig { returns(T::Boolean) } + def color?; end + + # Colorize a string if `color?` + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:139 + 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) + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:55 + sig { returns(::Spoom::Context) } + def context; end + + # Raise if `spoom` is not ran inside a context with a `sorbet/config` file + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:61 + sig { returns(::Spoom::Context) } + def context_requiring_sorbet!; end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:151 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # Return the path specified through `--path` + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:76 + sig { returns(::String) } + def exec_path; end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:156 + sig { params(string: ::String).returns(::String) } + def gray(string); end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:161 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:115 + sig { params(string: ::String).returns(::String) } + def highlight(string); end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:166 + sig { params(string: ::String).returns(::String) } + def red(string); end + + # Print `message` on `$stdout` + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:16 + sig { params(message: ::String).void } + def say(message); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Error`). + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:29 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Warning`). + # + # pkg:gem/spoom#lib/spoom/cli/helper.rb:43 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/helper.rb:171 + sig { params(string: ::String).returns(::String) } + def yellow(string); end +end + +# pkg:gem/spoom#lib/spoom/cli.rb:12 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli.rb:100 + def __print_version; end + + # pkg:gem/spoom#lib/spoom/cli.rb:57 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli.rb:64 + def coverage(*args); end + + # pkg:gem/spoom#lib/spoom/cli.rb:71 + def deadcode(*args); end + + # pkg:gem/spoom#lib/spoom/cli.rb:74 + def lsp(*args); end + + # pkg:gem/spoom#lib/spoom/cli.rb:21 + def srb(*args); end + + # pkg:gem/spoom#lib/spoom/cli.rb:93 + def tc(*paths_to_select); end + + class << self + # pkg:gem/spoom#lib/spoom/cli.rb:107 + def exit_on_failure?; end + end +end + +# pkg:gem/spoom#lib/spoom/cli.rb:80 +Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/cli.rb:82 +Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/cli.rb:81 +Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/cli/srb/assertions.rb:6 +module Spoom::Cli::Srb; end + +# pkg:gem/spoom#lib/spoom/cli/srb/assertions.rb:7 +class Spoom::Cli::Srb::Assertions < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:17 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/assertions.rb:42 + def transform_files(files, &block); end + + # pkg:gem/spoom#lib/spoom/cli/srb/assertions.rb:18 + def translate(*paths); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:10 +class Spoom::Cli::Srb::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:49 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:20 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/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 + + # pkg:gem/spoom#lib/spoom/cli/srb/bump.rb:192 + def undo_changes(files, from_strictness); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:10 +class Spoom::Cli::Srb::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:199 + def bundle_install(path, sha); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:23 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:211 + def message_no_data(file); end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:174 + def open(file = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:190 + def parse_time(string, option); end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:143 + def report; end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:21 + def snapshot; end + + # pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:43 + def timeline; end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/coverage.rb:13 +Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:11 +class Spoom::Cli::Srb::LSP < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:45 + def defs(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:55 + def find(query); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:26 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:31 + def hover(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:16 + def list; end + + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:104 + def lsp_client; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:75 + def refs(file, line, col); end + + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:127 + def run(&block); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:85 + def sigs(file, line, col); end + + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:119 + def symbol_printer; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:65 + def symbols(file); end + + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:152 + def to_uri(path); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # pkg:gem/spoom#lib/spoom/cli/srb/lsp.rb:95 + def types(file, line, col); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb.rb:15 +class Spoom::Cli::Srb::Main < ::Thor + # pkg:gem/spoom#lib/spoom/cli/srb.rb:17 + def assertions(*args); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:20 + def bump(*args); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:23 + def coverage(*args); end + + # pkg:gem/spoom#lib/spoom/cli.rb:21 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:26 + def lsp(*args); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:29 + def metrics(*args); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:32 + def sigs(*args); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:35 + def tc(*args); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/metrics.rb:7 +class Spoom::Cli::Srb::Metrics < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:29 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/metrics.rb:14 + def show(*paths); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:9 +class Spoom::Cli::Srb::Sigs < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:229 + def exec(context, command); end + + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:95 + def export(output_path = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:32 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:76 + def strip(*paths); end + + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:204 + def transform_files(files, &block); end + + # pkg:gem/spoom#lib/spoom/cli/srb/sigs.rb:25 + def translate(*paths); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:7 +class Spoom::Cli::Srb::Tc < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:147 + def colorize_message(message); end + + # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:138 + def format_error(error, format); end + + # pkg:gem/spoom#lib/spoom/cli/srb.rb:35 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:28 + def tc(*paths_to_select); end +end + +# pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:16 +Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:12 +Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:14 +Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/cli/srb/tc.rb:13 +Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/colors.rb:5 +class Spoom::Color < ::T::Enum + enums do + BLACK = new + BLUE = new + BOLD = new + CLEAR = new + CYAN = new + GREEN = new + LIGHT_BLACK = new + LIGHT_BLUE = new + LIGHT_CYAN = new + LIGHT_GREEN = new + LIGHT_MAGENTA = new + LIGHT_RED = new + LIGHT_WHITE = new + LIGHT_YELLOW = new + MAGENTA = new + RED = new + WHITE = new + YELLOW = new + end + + # pkg:gem/spoom#lib/spoom/colors.rb:30 + sig { returns(::String) } + def ansi_code; end +end + +# pkg:gem/spoom#lib/spoom/colors.rb:35 +module Spoom::Colorize + # pkg:gem/spoom#lib/spoom/colors.rb:37 + 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. +# +# pkg:gem/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. + # + # pkg:gem/spoom#lib/spoom/context.rb:47 + sig { params(absolute_path: ::String).void } + def initialize(absolute_path); end + + # The absolute path to the directory this context is about + # + # pkg:gem/spoom#lib/spoom/context.rb:40 + 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. + # + # pkg:gem/spoom#lib/spoom/context.rb:33 + sig { params(name: T.nilable(::String)).returns(T.attached_class) } + def mktmp!(name = T.unsafe(nil)); end + end +end + +# Bundle features for a context +# +# pkg:gem/spoom#lib/spoom/context/bundle.rb:8 +module Spoom::Context::Bundle + requires_ancestor { Spoom::Context } + + # Run a command with `bundle` in this context directory + # + # pkg:gem/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 + # + # pkg:gem/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 + # + # pkg:gem/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. + # + # pkg:gem/spoom#lib/spoom/context/bundle.rb:63 + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } + def gem_version_from_gemfile_lock(gem); end + + # pkg:gem/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 + # + # pkg:gem/spoom#lib/spoom/context/bundle.rb:11 + sig { returns(T.nilable(::String)) } + def read_gemfile; end + + # Read the contents of the Gemfile.lock in this context directory + # + # pkg:gem/spoom#lib/spoom/context/bundle.rb:19 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # pkg:gem/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 +# +# pkg:gem/spoom#lib/spoom/context/exec.rb:28 +module Spoom::Context::Exec + requires_ancestor { Spoom::Context } + + # Run a command in this context directory + # + # pkg:gem/spoom#lib/spoom/context/exec.rb:31 + 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 +# +# pkg:gem/spoom#lib/spoom/context/file_system.rb:8 +module Spoom::Context::FileSystem + requires_ancestor { Spoom::Context } + + # Returns the absolute path to `relative_path` in the context's directory + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:11 + sig { params(relative_path: ::String).returns(::String) } + def absolute_path_to(relative_path); end + + # pkg:gem/spoom#lib/spoom/context/file_system.rb:47 + 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. + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:99 + sig { void } + def destroy!; end + + # Does the context directory at `absolute_path` exist and is a directory? + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:17 + sig { returns(T::Boolean) } + def exist?; end + + # Does `relative_path` point to an existing file in this context directory? + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:59 + sig { params(relative_path: ::String).returns(T::Boolean) } + def file?(relative_path); end + + # List all files in this context matching `pattern` + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:30 + 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 + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:38 + sig { returns(T::Array[::String]) } + def list; end + + # Create the context directory at `absolute_path` + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:23 + sig { void } + def mkdir!; end + + # Move the file or directory from `from_relative_path` to `to_relative_path` + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:89 + 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. + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:67 + sig { params(relative_path: ::String).returns(::String) } + def read(relative_path); end + + # Remove the path at `relative_path` (recursive + force) in this context directory + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:83 + 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. + # + # pkg:gem/spoom#lib/spoom/context/file_system.rb:75 + 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 +# +# pkg:gem/spoom#lib/spoom/context/git.rb:32 +module Spoom::Context::Git + requires_ancestor { Spoom::Context } + + # Run a command prefixed by `git` in this context directory + # + # pkg:gem/spoom#lib/spoom/context/git.rb:35 + sig { params(command: ::String).returns(::Spoom::ExecResult) } + def git(command); end + + # Run `git checkout` in this context directory + # + # pkg:gem/spoom#lib/spoom/context/git.rb:54 + 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 + # + # pkg:gem/spoom#lib/spoom/context/git.rb:60 + 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 + # + # pkg:gem/spoom#lib/spoom/context/git.rb:70 + 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 + # + # pkg:gem/spoom#lib/spoom/context/git.rb:81 + sig { returns(T.nilable(::String)) } + def git_current_branch; end + + # Run `git diff` in this context directory + # + # pkg:gem/spoom#lib/spoom/context/git.rb:90 + 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>")`. + # + # pkg:gem/spoom#lib/spoom/context/git.rb:44 + 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 + # + # pkg:gem/spoom#lib/spoom/context/git.rb:96 + sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } + def git_last_commit(short_sha: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/context/git.rb:107 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_log(*arg); end + + # Run `git push <remote> <ref>` in this context directory + # + # pkg:gem/spoom#lib/spoom/context/git.rb:113 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/context/git.rb:118 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_show(*arg); end + + # Is there uncommitted changes in this context directory? + # + # pkg:gem/spoom#lib/spoom/context/git.rb:124 + sig { params(path: ::String).returns(T::Boolean) } + def git_workdir_clean?(path: T.unsafe(nil)); end +end + +# Sorbet features for a context +# +# pkg:gem/spoom#lib/spoom/context/sorbet.rb:8 +module Spoom::Context::Sorbet + requires_ancestor { Spoom::Context } + + # Does this context has a `sorbet/config` file? + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:108 + sig { returns(T::Boolean) } + def has_sorbet_config?; end + + # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:131 + 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 + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:119 + sig { returns(::String) } + def read_sorbet_config; end + + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:113 + sig { returns(::Spoom::Sorbet::Config) } + def sorbet_config; end + + # Get the commit introducing the `sorbet/config` file + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:137 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_intro_commit; end + + # Get the commit removing the `sorbet/config` file + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:149 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_removal_commit; end + + # Run `bundle exec srb` in this context directory + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:11 + 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` + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:60 + 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` + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:93 + 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 + + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:35 + 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 + + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:29 + 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 + + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:99 + 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 + # + # pkg:gem/spoom#lib/spoom/context/sorbet.rb:125 + sig { params(contents: ::String, append: T::Boolean).void } + def write_sorbet_config!(contents, append: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/counters.rb:6 +class Spoom::Counters < ::Hash + extend T::Generic + + K = type_member { { fixed: String } } + V = type_member { { fixed: Integer } } + Elem = type_member { { fixed: [String, Integer] } } + + # pkg:gem/spoom#lib/spoom/counters.rb:8 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/counters.rb:18 + sig { params(key: ::String).returns(::Integer) } + def [](key); end + + # pkg:gem/spoom#lib/spoom/counters.rb:13 + sig { params(key: ::String).void } + def increment(key); end +end + +# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:5 +module Spoom::Coverage + class << self + # pkg:gem/spoom#lib/spoom/coverage.rb:101 + sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } + def file_tree(context); end + + # pkg:gem/spoom#lib/spoom/coverage.rb:81 + 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 + + # pkg:gem/spoom#lib/spoom/coverage.rb:14 + 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 + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:81 +module Spoom::Coverage::Cards; end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:82 +class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template + # pkg:gem/spoom#lib/spoom/coverage/report.rb:89 + 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 + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:86 + def body; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:86 + sig { returns(T.nilable(::String)) } + def title; end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:83 +Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/report.rb:97 +class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card + abstract! + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:99 + sig { void } + def initialize; end + + # @abstract + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:109 + sig { abstract.returns(::String) } + def erb; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:103 + sig { override.returns(::String) } + def html; end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:140 +class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card + # pkg:gem/spoom#lib/spoom/coverage/report.rb:147 + 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 + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:112 +class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card + # pkg:gem/spoom#lib/spoom/coverage/report.rb:119 + sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } + def initialize(snapshot:, title: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:130 + sig { returns(::Spoom::Coverage::D3::Pie::Calls) } + def pie_calls; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:125 + sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } + def pie_sigils; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:135 + sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } + def pie_sigs; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:116 + sig { returns(::Spoom::Coverage::Snapshot) } + def snapshot; end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:113 +Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:209 +class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb + # pkg:gem/spoom#lib/spoom/coverage/report.rb:211 + 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 + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:218 + sig { override.returns(::String) } + def erb; end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:160 +class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card + # pkg:gem/spoom#lib/spoom/coverage/report.rb:162 + sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } + def initialize(title:, timeline:); end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:173 +class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/spoom#lib/spoom/coverage/report.rb:175 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:187 +class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/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 + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:201 +class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/spoom#lib/spoom/coverage/report.rb:203 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:166 +class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/spoom#lib/spoom/coverage/report.rb:168 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:180 +class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/spoom#lib/spoom/coverage/report.rb:182 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:194 +class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline + # pkg:gem/spoom#lib/spoom/coverage/report.rb:196 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:6 +module Spoom::Coverage::D3 + class << self + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:59 + sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } + def header_script(palette); end + + # pkg:gem/spoom#lib/spoom/coverage/d3.rb:19 + sig { returns(::String) } + def header_style; end + end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:8 +class Spoom::Coverage::D3::Base + abstract! + + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:13 + sig { params(id: ::String, data: T.untyped).void } + def initialize(id, data); end + + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:31 + sig { returns(::String) } + def html; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:10 + sig { returns(::String) } + def id; end + + # @abstract + # + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:45 + sig { abstract.returns(::String) } + def script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:39 + sig { returns(::String) } + def tooltip; end + + class << self + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:25 + sig { returns(::String) } + def header_script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/base.rb:20 + sig { returns(::String) } + def header_style; end + end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:12 +Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:11 +Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:14 +Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:15 +Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:13 +Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:9 +class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:58 + sig { override.returns(::String) } + def script; end + + class << self + # pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:38 + sig { returns(::String) } + def header_script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:12 + sig { returns(::String) } + def header_style; end + end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:147 +class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap + # pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:154 + 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 + + # pkg:gem/spoom#lib/spoom/coverage/d3/circle_map.rb:161 + sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } + def tree_node_to_json(node); end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3.rb:101 +class Spoom::Coverage::D3::ColorPalette < ::T::Struct + prop :ignore, ::String + prop :false, ::String + prop :true, ::String + prop :strict, ::String + prop :strong, ::String +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:10 +class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base + abstract! + + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:12 + sig { params(id: ::String, title: ::String, data: T.untyped).void } + def initialize(id, title, data); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:51 + sig { override.returns(::String) } + def script; end + + class << self + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:37 + sig { returns(::String) } + def header_script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:19 + sig { returns(::String) } + def header_style; end + end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:135 +class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:137 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:143 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:118 +class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:120 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:126 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:152 +class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:154 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/pie.rb:164 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:10 +class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base + abstract! + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:12 + sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } + def initialize(id, data, keys); end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:183 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:199 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @abstract + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:122 + sig { abstract.returns(::String) } + def plot; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:213 + sig { params(y: ::String).returns(::String) } + def points(y:); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:96 + sig { override.returns(::String) } + def script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:125 + sig { returns(::String) } + def x_scale; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:141 + sig { returns(::String) } + def x_ticks; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:154 + sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } + def y_scale(min:, max:, ticks:); end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:170 + sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } + def y_ticks(ticks:, format:, padding:); end + + class << self + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:73 + sig { returns(::String) } + def header_script; end + + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:19 + sig { returns(::String) } + def header_style; end + end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:442 +class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:444 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:459 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:497 +class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:499 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:570 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:611 + sig { override.returns(::String) } + def plot; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:529 + sig { override.returns(::String) } + def script; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:514 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:278 +class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:280 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:307 + sig { override.returns(::String) } + def plot; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:293 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:416 +class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:418 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:433 + sig { override.returns(::String) } + def tooltip; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:468 +class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:470 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:488 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:326 +class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline + abstract! + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:383 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:371 + sig { override.returns(::String) } + def plot; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:329 + sig { override.returns(::String) } + def script; end +end + +# pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:228 +class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:230 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:259 + sig { override.returns(::String) } + def plot; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/d3/timeline.rb:244 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/report.rb:35 +class Spoom::Coverage::Page < ::Spoom::Coverage::Template + abstract! + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:45 + sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } + def initialize(title:, palette:, template: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:67 + sig { returns(::String) } + def body_html; end + + # @abstract + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:73 + sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:76 + sig { returns(::String) } + def footer_html; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:62 + sig { returns(::String) } + def header_html; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:57 + sig { returns(::String) } + def header_script; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:52 + sig { returns(::String) } + def header_style; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:42 + sig { returns(::Spoom::Coverage::D3::ColorPalette) } + def palette; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:39 + sig { returns(::String) } + def title; end +end + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:36 +Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/coverage/report.rb:229 +class Spoom::Coverage::Report < ::Spoom::Coverage::Page + # pkg:gem/spoom#lib/spoom/coverage/report.rb:240 + 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 + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:274 + sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # @override + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:262 + sig { override.returns(::String) } + def header_html; end +end + +# pkg:gem/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) + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:31 + 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 + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:37 + sig { params(arg: T.untyped).returns(::String) } + def to_json(*arg); end + + class << self + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:43 + sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } + def from_json(json); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:48 + sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } + def from_obj(obj); end + end +end + +# The strictness name as found in the Sorbet metrics file +# +# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:28 +Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:91 +class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:93 + sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } + def print_snapshot(snapshot); end + + private + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:152 + sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } + def percent(value, total); end + + # pkg:gem/spoom#lib/spoom/coverage/snapshot.rb:141 + sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } + def print_map(hash, total); end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/coverage/report.rb:11 +class Spoom::Coverage::Template + abstract! + + # Create a new template from an Erb file path + # + # pkg:gem/spoom#lib/spoom/coverage/report.rb:14 + sig { params(template: ::String).void } + def initialize(template:); end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:19 + sig { returns(::String) } + def erb; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:29 + sig { returns(::Binding) } + def get_binding; end + + # pkg:gem/spoom#lib/spoom/coverage/report.rb:24 + sig { returns(::String) } + def html; end +end + +# pkg:gem/spoom#lib/spoom/deadcode/erb.rb:27 +module Spoom::Deadcode + class << self + # pkg:gem/spoom#lib/spoom/deadcode/plugins.rb:67 + sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } + def load_custom_plugins(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins.rb:53 + sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) } + def plugins_from_gemfile_lock(context); end + end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins.rb:26 +Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins.rb:28 +Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) + +# A definition is a class, module, method, constant, etc. being defined in the code +# +# pkg:gem/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::Location + const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:76 + sig { void } + def alive!; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:71 + sig { returns(T::Boolean) } + def alive?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:39 + sig { returns(T::Boolean) } + def attr_reader?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:44 + sig { returns(T::Boolean) } + def attr_writer?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:49 + sig { returns(T::Boolean) } + def class?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:54 + sig { returns(T::Boolean) } + def constant?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:81 + sig { returns(T::Boolean) } + def dead?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:91 + sig { void } + def ignored!; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:86 + sig { returns(T::Boolean) } + def ignored?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:59 + sig { returns(T::Boolean) } + def method?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:64 + sig { returns(T::Boolean) } + def module?; end + + # pkg:gem/spoom#lib/spoom/deadcode/definition.rb:98 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:8 +class Spoom::Deadcode::Definition::Kind < ::T::Enum + enums do + AttrReader = new + AttrWriter = new + Class = new + Constant = new + Method = new + Module = new + end +end + +# pkg:gem/spoom#lib/spoom/deadcode/definition.rb:19 +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 +# +# pkg:gem/spoom#lib/spoom/deadcode/erb.rb:29 +class Spoom::Deadcode::ERB < ::Erubi::Engine + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:31 + sig { params(input: T.untyped, properties: T.untyped).void } + def initialize(input, properties = T.unsafe(nil)); end + + private + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:84 + sig { override.params(code: T.untyped).void } + def add_code(code); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:66 + sig { override.params(indicator: T.untyped, code: T.untyped).void } + def add_expression(indicator, code); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:91 + def add_postamble(_); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:47 + sig { override.params(text: T.untyped).void } + def add_text(text); end + + # pkg:gem/spoom#lib/spoom/deadcode/erb.rb:97 + sig { params(src: T.untyped).void } + def flush_newline_if_pending(src); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/erb.rb:62 +Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/spoom#lib/spoom/deadcode/index.rb:6 +class Spoom::Deadcode::Index + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:25 + sig { params(model: ::Spoom::Model).void } + def initialize(model); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:215 + sig { returns(T::Array[::Spoom::Deadcode::Definition]) } + def all_definitions; end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:220 + sig { returns(T::Array[::Spoom::Model::Reference]) } + def all_references; end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:95 + sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def apply_plugins!(plugins); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:75 + sig { params(definition: ::Spoom::Deadcode::Definition).void } + def define(definition); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:19 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } + def definitions; end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:210 + 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. + # + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:118 + sig { void } + def finalize!; end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:90 + sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } + def ignore(symbol_def); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:46 + sig { params(erb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_erb(erb, file:, plugins: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:35 + sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_file(file, plugins: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:51 + sig { params(rb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_ruby(rb, file:, plugins: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:16 + sig { returns(::Spoom::Model) } + def model; end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:80 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_constant(name, location); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:85 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_method(name, location); end + + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:22 + sig { returns(T::Hash[::String, T::Array[::Spoom::Model::Reference]]) } + def references; end +end + +# pkg:gem/spoom#lib/spoom/deadcode/index.rb:7 +class Spoom::Deadcode::Index::Error < ::Spoom::Error + # pkg:gem/spoom#lib/spoom/deadcode/index.rb:9 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/indexer.rb:6 +class Spoom::Deadcode::Indexer < ::Spoom::Visitor + # pkg:gem/spoom#lib/spoom/deadcode/indexer.rb:14 + sig do + params( + path: ::String, + index: ::Spoom::Deadcode::Index, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def initialize(path, index, plugins: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/deadcode/indexer.rb:11 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # pkg:gem/spoom#lib/spoom/deadcode/indexer.rb:8 + sig { returns(::String) } + def path; end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/indexer.rb:26 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins.rb:33 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:8 +module Spoom::Deadcode::Plugins; end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/action_mailer.rb:7 +class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/action_mailer.rb:10 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/action_mailer_preview.rb:7 +class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/action_mailer_preview.rb:12 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/actionpack.rb:7 +class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/actionpack.rb:27 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/actionpack.rb:36 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/actionpack.rb:10 +Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_job.rb:7 +class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/active_job.rb:22 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_job.rb:11 +Spoom::Deadcode::Plugins::ActiveJob::CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_model.rb:7 +class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/active_model.rb:13 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:7 +class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:69 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:61 +Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:18 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:44 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACK_CONDITIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_record.rb:49 +Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_support.rb:7 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/active_support.rb:23 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/active_support.rb:19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) + +# @abstract +# +# pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:10 +class Spoom::Deadcode::Plugins::Base + abstract! + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:126 + sig { params(index: ::Spoom::Deadcode::Index).void } + def initialize(index); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:123 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # Do not override this method, use `on_define_accessor` instead. + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:152 + sig { params(definition: ::Spoom::Model::Attr).void } + def internal_on_define_accessor(definition); end + + # Do not override this method, use `on_define_class` instead. + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:176 + sig { params(definition: ::Spoom::Model::Class).void } + def internal_on_define_class(definition); end + + # Do not override this method, use `on_define_constant` instead. + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:206 + sig { params(definition: ::Spoom::Model::Constant).void } + def internal_on_define_constant(definition); end + + # Do not override this method, use `on_define_method` instead. + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:232 + sig { params(definition: ::Spoom::Model::Method).void } + def internal_on_define_method(definition); end + + # Do not override this method, use `on_define_module` instead. + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:258 + sig { params(definition: ::Spoom::Model::Module).void } + def internal_on_define_module(definition); end + + # Called when an accessor is defined. + # + # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_accessor(definition) + # @index.ignore(definition) if symbol_def.name == "foo" + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:146 + sig { params(definition: ::Spoom::Model::Attr).void } + def on_define_accessor(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(definition) + # @index.ignore(definition) if definition.name == "Foo" + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:170 + sig { params(definition: ::Spoom::Model::Class).void } + def on_define_class(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(definition) + # @index.ignore(definition) if definition.name == "FOO" + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:200 + sig { params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(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(definition) + # @index.ignore(definition) if definition.name == "foo" + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:226 + sig { params(definition: ::Spoom::Model::Method).void } + def on_define_method(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(definition) + # @index.ignore(definition) if definition.name == "Foo" + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:252 + sig { params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end + + # Called when a send is being processed + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_send(send) + # return unless send.name == "dsl_method" + # return if send.args.empty? + # + # method_name = send.args.first.slice.delete_prefix(":") + # @index.reference_method(method_name, send.node, send.loc) + # end + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:278 + sig { params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:346 + sig { params(name: ::String).returns(::String) } + def camelize(name); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:295 + sig { params(name: T.nilable(::String)).returns(T::Boolean) } + def ignored_class_name?(name); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:314 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_constant_name?(name); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:319 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_method_name?(name); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:324 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_module_name?(name); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:329 + sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } + def ignored_name?(name, names_variable, patterns_variable); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:302 + sig { params(definition: ::Spoom::Model::Class).returns(T::Boolean) } + def ignored_subclass?(definition); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:334 + sig { params(const: ::Symbol).returns(T::Set[::String]) } + def names(const); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:339 + sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } + def patterns(const); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:287 + sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } + def subclass_of?(definition, superclass_name); end + + class << self + # Mark classes directly subclassing a class matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_classes_inheriting_from( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:46 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_inheriting_from(*names); end + + # Mark classes matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:28 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_named(*names); end + + # Mark constants matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "FOO", + # "BAR", + # /BAZ.*/, + # ) + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:64 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_constants_named(*names); end + + # Mark methods matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_method_names( + # "foo", + # "bar", + # /baz.*/, + # ) + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:82 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_methods_named(*names); end + + # Mark modules matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:100 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_modules_named(*names); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/base.rb:107 + 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 + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/graphql.rb:7 +class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/graphql.rb:27 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/minitest.rb:7 +class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/minitest.rb:21 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/minitest.rb:28 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/namespaces.rb:7 +class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/namespaces.rb:10 + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/namespaces.rb:16 + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/namespaces.rb:23 + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def used_as_namespace?(symbol_def); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/rspec.rb:7 +class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/rails.rb:7 +class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/rails.rb:12 + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/rails.rb:18 + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/rails.rb:25 + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def file_is_helper?(symbol_def); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/rake.rb:7 +class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/rubocop.rb:7 +class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/rubocop.rb:17 + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/rubocop.rb:26 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/rubocop.rb:8 +Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/ruby.rb:7 +class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/ruby.rb:23 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/ruby.rb:51 + sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } + def reference_symbol_as_constant(send, node); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/sorbet.rb:7 +class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/sorbet.rb:10 + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/sorbet.rb:16 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/sorbet.rb:34 + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_enum_constant?(definition); end + + # pkg:gem/spoom#lib/spoom/deadcode/plugins/sorbet.rb:29 + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_type_member?(definition); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/plugins/thor.rb:7 +class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/plugins/thor.rb:12 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:6 +class Spoom::Deadcode::Remover + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:10 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:15 + sig { params(kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Location).returns(::String) } + def remove_location(kind, location); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:7 +class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:366 +class Spoom::Deadcode::Remover::NodeContext + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:377 + sig do + params( + source: ::String, + comments: T::Hash[::Integer, ::Prism::Comment], + node: ::Prism::Node, + nesting: T::Array[::Prism::Node] + ).void + end + def initialize(source, comments, node, nesting); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:491 + sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } + def attached_comments(node); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:519 + sig { returns(T.nilable(::Prism::CallNode)) } + def attached_sig; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:506 + sig { returns(T::Array[::Prism::Node]) } + def attached_sigs; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:368 + sig { returns(T::Hash[::Integer, ::Prism::Comment]) } + def comments; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:479 + sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } + def comments_between_lines(start_line, end_line); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:374 + sig { returns(T::Array[::Prism::Node]) } + def nesting; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:374 + def nesting=(_arg0); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:429 + sig { returns(T.nilable(::Prism::Node)) } + def next_node; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:418 + sig { returns(T::Array[::Prism::Node]) } + def next_nodes; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:371 + sig { returns(::Prism::Node) } + def node; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:393 + sig { returns(::Spoom::Deadcode::Remover::NodeContext) } + def parent_context; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:385 + sig { returns(::Prism::Node) } + def parent_node; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:413 + sig { returns(T.nilable(::Prism::Node)) } + def previous_node; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:402 + sig { returns(T::Array[::Prism::Node]) } + def previous_nodes; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:434 + sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } + def sclass_context; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:467 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_extend_sig?(node); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:462 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_signature?(node); end +end + +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:534 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:599 + sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + def initialize(location, kind); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:593 + sig { returns(T.nilable(::Prism::Node)) } + def node; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:596 + sig { returns(T::Array[::Prism::Node]) } + def nodes_nesting; end + + # @override + # + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:609 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + class << self + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:537 + sig do + params( + source: ::String, + location: ::Spoom::Location, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::Spoom::Deadcode::Remover::NodeContext) + end + def find(source, location, kind); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:568 + sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } + def node_match_kind?(node, kind); end + end +end + +# pkg:gem/spoom#lib/spoom/deadcode/remover.rb:27 +class Spoom::Deadcode::Remover::NodeRemover + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:32 + sig do + params( + source: ::String, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Location + ).void + end + def initialize(source, kind, location); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:42 + sig { void } + def apply_edit; end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:29 + sig { returns(::String) } + def new_source; end + + private + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:151 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_attr_accessor(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:325 + sig { params(start_char: ::Integer, end_char: ::Integer).void } + def delete_chars(start_char, end_char); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:69 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_constant_assignment(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:318 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def delete_lines(start_line, end_line); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:255 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_node_and_comments_and_sigs(context); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:212 + sig do + params( + node: ::Prism::Node, + send_context: ::Spoom::Deadcode::Remover::NodeContext, + was_removed: T::Boolean + ).void + end + def insert_accessor(node, send_context, was_removed:); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:330 + sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } + def replace_chars(start_char, end_char, replacement); end + + # pkg:gem/spoom#lib/spoom/deadcode/remover.rb:335 + sig do + params( + node: ::Prism::CallNode, + name: ::String, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::String) + end + def transform_sig(node, name:, kind:); end +end + +# An abstraction to simplify handling of Prism::CallNode nodes. +# +# pkg:gem/spoom#lib/spoom/deadcode/send.rb:7 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::Prism::CallNode + const :name, ::String + const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :args, T::Array[::Prism::Node], default: T.unsafe(nil) + const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :location, ::Spoom::Location + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:16 + sig do + type_parameters(:T) + .params( + arg_type: T::Class[T.type_parameter(:T)], + block: T.proc.params(arg: T.type_parameter(:T)).void + ).void + end + def each_arg(arg_type, &block); end + + # pkg:gem/spoom#lib/spoom/deadcode/send.rb:23 + sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } + def each_arg_assoc(&block); end +end + +# pkg:gem/spoom#lib/spoom.rb:10 +class Spoom::Error < ::StandardError; end + +# pkg:gem/spoom#lib/spoom/context/exec.rb:7 +class Spoom::ExecResult < ::T::Struct + const :out, ::String + const :err, T.nilable(::String) + const :status, T::Boolean + const :exit_code, ::Integer + + # pkg:gem/spoom#lib/spoom/context/exec.rb:14 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/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. + # + # pkg:gem/spoom#lib/spoom/file_collector.rb:18 + 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 + + # pkg:gem/spoom#lib/spoom/file_collector.rb:7 + sig { returns(T::Array[::String]) } + def files; end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:31 + sig { params(path: ::String).void } + def visit_path(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:26 + sig { params(paths: T::Array[::String]).void } + def visit_paths(paths); end + + private + + # pkg:gem/spoom#lib/spoom/file_collector.rb:54 + sig { params(path: ::String).returns(::String) } + def clean_path(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:71 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_file?(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:86 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_path?(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:95 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:66 + sig { params(path: ::String).void } + def visit_directory(path); end + + # pkg:gem/spoom#lib/spoom/file_collector.rb:59 + sig { params(path: ::String).void } + def visit_file(path); end +end + +# Build a file hierarchy from a set of file paths. +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:6 +class Spoom::FileTree + # pkg:gem/spoom#lib/spoom/file_tree.rb:8 + 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`. + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:23 + sig { params(path: ::String).returns(::Spoom::FileTree::Node) } + def add_path(path); end + + # Add all `paths` to the tree + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:15 + sig { params(paths: T::Enumerable[::String]).void } + def add_paths(paths); end + + # All the nodes in this tree + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:43 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # Return a map of typing scores for each node in the tree + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:57 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(context); end + + # All the paths in this tree + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:51 + sig { returns(T::Array[::String]) } + def paths; end + + # Return a map of typing scores for each path in the tree + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:65 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:70 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # All root nodes + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:37 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def roots; end +end + +# A visitor that collects all the nodes in a tree +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:116 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # pkg:gem/spoom#lib/spoom/file_tree.rb:121 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:118 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # @override + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:128 + 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 +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:157 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # pkg:gem/spoom#lib/spoom/file_tree.rb:162 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:159 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end + + # @override + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:170 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/file_tree.rb:179 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:188 + 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 +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:135 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # pkg:gem/spoom#lib/spoom/file_tree.rb:140 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:137 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end + + # @override + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:148 + 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 +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:76 +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 + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:88 + sig { returns(::String) } + def path; end +end + +# An internal class used to print a FileTree +# +# See `FileTree#print` +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:201 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # pkg:gem/spoom#lib/spoom/file_tree.rb:203 + 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 + + # @override + # + # pkg:gem/spoom#lib/spoom/file_tree.rb:212 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/file_tree.rb:237 + sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } + def strictness_color(strictness); end +end + +# An abstract visitor for FileTree +# @abstract +# +# pkg:gem/spoom#lib/spoom/file_tree.rb:98 +class Spoom::FileTree::Visitor + abstract! + + # pkg:gem/spoom#lib/spoom/file_tree.rb:105 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:110 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end + + # pkg:gem/spoom#lib/spoom/file_tree.rb:100 + sig { params(tree: ::Spoom::FileTree).void } + def visit_tree(tree); end +end + +# pkg:gem/spoom#lib/spoom/context/git.rb:5 +module Spoom::Git; end + +# pkg:gem/spoom#lib/spoom/context/git.rb:6 +class Spoom::Git::Commit < ::T::Struct + const :sha, ::String + const :time, ::Time + + # pkg:gem/spoom#lib/spoom/context/git.rb:23 + sig { returns(::Integer) } + def timestamp; end + + class << self + # Parse a line formatted as `%h %at` into a `Commit` + # + # pkg:gem/spoom#lib/spoom/context/git.rb:10 + sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } + def parse_line(string); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:5 +module Spoom::LSP; end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:13 +class Spoom::LSP::Client + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:15 + sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } + def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:227 + sig { void } + def close; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:129 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def definitions(uri, line, column); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:210 + sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def document_symbols(uri); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:87 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } + def hover(uri, line, column); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:25 + sig { returns(::Integer) } + def next_id; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:70 + sig { params(workspace_path: ::String).void } + def open(workspace_path); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:52 + sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def read; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:41 + sig { returns(T.nilable(::String)) } + def read_raw; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:171 + 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 + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:35 + sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def send(message); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:30 + sig { params(json_string: ::String).void } + def send_raw(json_string); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:108 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } + def signatures(uri, line, column); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:195 + sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def symbols(query); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp.rb:150 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def type_definitions(uri, line, column); end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:165 +class Spoom::LSP::Diagnostic < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :range, ::Spoom::LSP::Range + const :code, ::Integer + const :message, ::String + const :information, ::Object + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:187 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:192 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:175 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:197 +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] + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:223 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:255 + sig { returns(::String) } + def kind_string; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:250 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:209 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:259 +Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:6 +class Spoom::LSP::Error < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:7 +class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:8 +class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:10 +class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:28 + sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } + def initialize(uri, diagnostics); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:15 + sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } + def diagnostics; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:12 + sig { returns(::String) } + def uri; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:19 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:74 +class Spoom::LSP::Hover < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :contents, ::String + const :range, T.nilable(::Spoom::LSP::Range) + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:92 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:98 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:82 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:103 +class Spoom::LSP::Location < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :uri, ::String + const :range, ::Spoom::LSP::Range + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:121 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:127 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:111 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } + def from_json(json); end + end +end + +# A general message as defined by JSON-RPC. +# +# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:12 +class Spoom::LSP::Message + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:14 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:19 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def as_json; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:27 + 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. +# +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:54 +class Spoom::LSP::Notification < ::Spoom::LSP::Message + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:62 + sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(method, params); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:56 + sig { returns(::String) } + def method; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:59 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:16 +class Spoom::LSP::Position < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :line, ::Integer + const :char, ::Integer + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:34 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:39 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:24 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } + def from_json(json); end + end +end + +# @interface +# +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:10 +module Spoom::LSP::PrintableSymbol + interface! + + # @abstract + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:13 + sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:44 +class Spoom::LSP::Range < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :start, ::Spoom::LSP::Position + const :end, ::Spoom::LSP::Position + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:62 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:69 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:52 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } + def from_json(json); 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. +# +# pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:35 +class Spoom::LSP::Request < ::Spoom::LSP::Message + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:43 + sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(id, method, params); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:37 + sig { returns(::Integer) } + def id; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/base.rb:40 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:36 +class Spoom::LSP::ResponseError < ::Spoom::LSP::Error + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:55 + sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } + def initialize(code, message, data); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:38 + sig { returns(::Integer) } + def code; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:41 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def data; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/errors.rb:45 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:132 +class Spoom::LSP::SignatureHelp < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :label, T.nilable(::String) + const :doc, ::Object + const :params, T::Array[T.untyped] + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:152 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:160 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:141 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } + def from_json(json); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:289 +class Spoom::LSP::SymbolPrinter < ::Spoom::Printer + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:297 + 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 + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:319 + sig { params(uri: ::String).returns(::String) } + def clean_uri(uri); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:294 + sig { returns(T.nilable(::String)) } + def prefix; end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:294 + def prefix=(_arg0); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:327 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_list(objects); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:307 + sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } + def print_object(object); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:314 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_objects(objects); end + + # pkg:gem/spoom#lib/spoom/sorbet/lsp/structures.rb:291 + sig { returns(T::Set[::Integer]) } + def seen; end +end + +# pkg:gem/spoom#lib/spoom/location.rb:5 +class Spoom::Location + include ::Comparable + + # pkg:gem/spoom#lib/spoom/location.rb:61 + sig do + params( + file: ::String, + start_line: T.nilable(::Integer), + start_column: T.nilable(::Integer), + end_line: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file, start_line: T.unsafe(nil), start_column: T.unsafe(nil), end_line: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/location.rb:95 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # pkg:gem/spoom#lib/spoom/location.rb:58 + def end_column; end + + # pkg:gem/spoom#lib/spoom/location.rb:58 + def end_line; end + + # pkg:gem/spoom#lib/spoom/location.rb:55 + sig { returns(::String) } + def file; end + + # pkg:gem/spoom#lib/spoom/location.rb:81 + sig { params(other: ::Spoom::Location).returns(T::Boolean) } + def include?(other); end + + # pkg:gem/spoom#lib/spoom/location.rb:58 + def start_column; end + + # pkg:gem/spoom#lib/spoom/location.rb:58 + sig { returns(T.nilable(::Integer)) } + def start_line; end + + # pkg:gem/spoom#lib/spoom/location.rb:118 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/spoom#lib/spoom/location.rb:43 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } + def from_prism(file, location); end + + # pkg:gem/spoom#lib/spoom/location.rb:12 + sig { params(location_string: ::String).returns(::Spoom::Location) } + def from_string(location_string); end + end +end + +# pkg:gem/spoom#lib/spoom/location.rb:8 +class Spoom::Location::LocationError < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:5 +class Spoom::Model + # pkg:gem/spoom#lib/spoom/model/model.rb:240 + sig { void } + def initialize; end + + # Get a symbol by it's full name + # + # Raises an error if the symbol is not found + # + # pkg:gem/spoom#lib/spoom/model/model.rb:249 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def [](full_name); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:298 + sig { void } + def finalize!; end + + # Register a new symbol by it's full name + # + # If the symbol already exists, it will be returned. + # + # pkg:gem/spoom#lib/spoom/model/model.rb:260 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def register_symbol(full_name); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:265 + sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } + def resolve_symbol(full_name, context:); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:292 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def subtypes(symbol); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:286 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def supertypes(symbol); end + + # All the symbols registered in this model + # + # pkg:gem/spoom#lib/spoom/model/model.rb:234 + sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } + def symbols; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:237 + sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } + def symbols_hierarchy; end + + private + + # pkg:gem/spoom#lib/spoom/model/model.rb:305 + sig { void } + def compute_symbols_hierarchy!; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/model.rb:188 +class Spoom::Model::Attr < ::Spoom::Model::Property + abstract! +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:193 +class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:191 +class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:192 +class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end + +# Populate a Model by visiting the nodes from a Ruby file +# +# pkg:gem/spoom#lib/spoom/model/builder.rb:7 +class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor + # pkg:gem/spoom#lib/spoom/model/builder.rb:9 + sig { params(model: ::Spoom::Model, file: ::String).void } + def initialize(model, file); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:159 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:23 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:76 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:99 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:138 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:58 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:115 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/builder.rb:40 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/model/builder.rb:250 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def collect_sigs; end + + # pkg:gem/spoom#lib/spoom/model/builder.rb:245 + sig { returns(::Spoom::Model::Visibility) } + def current_visibility; end + + # pkg:gem/spoom#lib/spoom/model/builder.rb:262 + sig { params(node: ::Prism::Node).returns(T::Array[::Spoom::Model::Comment]) } + def node_comments(node); end + + # pkg:gem/spoom#lib/spoom/model/builder.rb:257 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:128 +class Spoom::Model::Class < ::Spoom::Model::Namespace + # pkg:gem/spoom#lib/spoom/model/model.rb:139 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + superclass_name: T.nilable(::String), + comments: T::Array[::Spoom::Model::Comment] + ).void + end + def initialize(symbol, owner:, location:, superclass_name: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:130 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:130 + def superclass_name=(_arg0); end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:8 +class Spoom::Model::Comment + # pkg:gem/spoom#lib/spoom/model/model.rb:16 + sig { params(string: ::String, location: ::Spoom::Location).void } + def initialize(string, location); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:13 + sig { returns(::Spoom::Location) } + def location; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:10 + sig { returns(::String) } + def string; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:148 +class Spoom::Model::Constant < ::Spoom::Model::SymbolDef + # pkg:gem/spoom#lib/spoom/model/model.rb:153 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + value: ::String, + comments: T::Array[::Spoom::Model::Comment] + ).void + end + def initialize(symbol, owner:, location:, value:, comments: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:150 + sig { returns(::String) } + def value; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:6 +class Spoom::Model::Error < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:217 +class Spoom::Model::Extend < ::Spoom::Model::Mixin; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:215 +class Spoom::Model::Include < ::Spoom::Model::Mixin; end + +# pkg:gem/spoom#lib/spoom/model/model.rb:185 +class Spoom::Model::Method < ::Spoom::Model::Property; end + +# A mixin (include, prepend, extend) to a namespace +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/model.rb:205 +class Spoom::Model::Mixin + abstract! + + # pkg:gem/spoom#lib/spoom/model/model.rb:210 + sig { params(name: ::String).void } + def initialize(name); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:207 + sig { returns(::String) } + def name; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:146 +class Spoom::Model::Module < ::Spoom::Model::Namespace; end + +# A class or module +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/model.rb:110 +class Spoom::Model::Namespace < ::Spoom::Model::SymbolDef + abstract! + + # pkg:gem/spoom#lib/spoom/model/model.rb:118 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + comments: T::Array[::Spoom::Model::Comment] + ).void + end + def initialize(symbol, owner:, location:, comments: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:112 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def children; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:115 + sig { returns(T::Array[::Spoom::Model::Mixin]) } + def mixins; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/namespace_visitor.rb:7 +class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor + abstract! + + # pkg:gem/spoom#lib/spoom/model/namespace_visitor.rb:9 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/namespace_visitor.rb:17 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:216 +class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end + +# A method or an attribute accessor +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/model.rb:162 +class Spoom::Model::Property < ::Spoom::Model::SymbolDef + abstract! + + # pkg:gem/spoom#lib/spoom/model/model.rb:177 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + visibility: ::Spoom::Model::Visibility, + sigs: T::Array[::Spoom::Model::Sig], + comments: T::Array[::Spoom::Model::Comment] + ).void + end + def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:167 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def sigs; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:164 + sig { returns(::Spoom::Model::Visibility) } + def visibility; end +end + +# A reference to something that looks like a constant or a method +# +# Constants could be classes, modules, or actual constants. +# Methods could be accessors, instance or class methods, aliases, etc. +# +# pkg:gem/spoom#lib/spoom/model/reference.rb:10 +class Spoom::Model::Reference < ::T::Struct + const :kind, ::Spoom::Model::Reference::Kind + const :name, ::String + const :location, ::Spoom::Location + + # pkg:gem/spoom#lib/spoom/model/reference.rb:35 + sig { returns(T::Boolean) } + def constant?; end + + # pkg:gem/spoom#lib/spoom/model/reference.rb:40 + sig { returns(T::Boolean) } + def method?; end + + class << self + # pkg:gem/spoom#lib/spoom/model/reference.rb:20 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def constant(name, location); end + + # pkg:gem/spoom#lib/spoom/model/reference.rb:25 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def method(name, location); end + end +end + +# pkg:gem/spoom#lib/spoom/model/reference.rb:11 +class Spoom::Model::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# Visit a file to collect all the references to constants and methods +# +# pkg:gem/spoom#lib/spoom/model/references_visitor.rb:7 +class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:12 + sig { params(file: ::String).void } + def initialize(file); end + + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:9 + sig { returns(T::Array[::Spoom::Model::Reference]) } + def references; end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:21 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:27 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:34 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:46 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:73 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:55 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:64 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:91 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:98 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:105 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:112 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:119 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:126 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:133 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:139 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:145 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:154 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:163 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:172 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:179 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:185 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:197 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:215 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end + + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:205 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end + + # pkg:gem/spoom#lib/spoom/model/references_visitor.rb:210 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end +end + +# A Sorbet signature (sig block) +# +# pkg:gem/spoom#lib/spoom/model/model.rb:220 +class Spoom::Model::Sig + # pkg:gem/spoom#lib/spoom/model/model.rb:225 + sig { params(string: ::String).void } + def initialize(string); end + + # pkg:gem/spoom#lib/spoom/model/model.rb:222 + sig { returns(::String) } + def string; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:126 +class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end + +# A Symbol is a uniquely named entity in the Ruby codebase +# +# A symbol can have multiple definitions, e.g. a class can be reopened. +# Sometimes a symbol can have multiple definitions of different types, +# e.g. `foo` method can be defined both as a method and as an attribute accessor. +# +# pkg:gem/spoom#lib/spoom/model/model.rb:27 +class Spoom::Model::Symbol + # pkg:gem/spoom#lib/spoom/model/model.rb:37 + sig { params(full_name: ::String).void } + def initialize(full_name); end + + # The definitions of this symbol (where it exists in the code) + # + # pkg:gem/spoom#lib/spoom/model/model.rb:34 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def definitions; end + + # The full, unique name of this symbol + # + # pkg:gem/spoom#lib/spoom/model/model.rb:30 + sig { returns(::String) } + def full_name; end + + # The short name of this symbol + # + # pkg:gem/spoom#lib/spoom/model/model.rb:44 + sig { returns(::String) } + def name; end + + # pkg:gem/spoom#lib/spoom/model/model.rb:49 + sig { returns(::String) } + def to_s; end +end + +# A SymbolDef is a definition of a Symbol +# +# It can be a class, module, constant, method, etc. +# A SymbolDef has a location pointing to the actual code that defines the symbol. +# @abstract +# +# pkg:gem/spoom#lib/spoom/model/model.rb:67 +class Spoom::Model::SymbolDef + abstract! + + # pkg:gem/spoom#lib/spoom/model/model.rb:85 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + comments: T::Array[::Spoom::Model::Comment] + ).void + end + def initialize(symbol, owner:, location:, comments:); end + + # The comments associated with this definition + # + # pkg:gem/spoom#lib/spoom/model/model.rb:82 + sig { returns(T::Array[::Spoom::Model::Comment]) } + def comments; end + + # The full name of the symbol this definition belongs to + # + # pkg:gem/spoom#lib/spoom/model/model.rb:97 + sig { returns(::String) } + def full_name; end + + # The actual code location of this definition + # + # pkg:gem/spoom#lib/spoom/model/model.rb:78 + sig { returns(::Spoom::Location) } + def location; end + + # The short name of the symbol this definition belongs to + # + # pkg:gem/spoom#lib/spoom/model/model.rb:103 + sig { returns(::String) } + def name; end + + # The enclosing namespace this definition belongs to + # + # pkg:gem/spoom#lib/spoom/model/model.rb:74 + sig { returns(T.nilable(::Spoom::Model::Namespace)) } + def owner; end + + # The symbol this definition belongs to + # + # pkg:gem/spoom#lib/spoom/model/model.rb:70 + sig { returns(::Spoom::Model::Symbol) } + def symbol; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:54 +class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol + # @override + # + # pkg:gem/spoom#lib/spoom/model/model.rb:57 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/spoom#lib/spoom/model/model.rb:195 +class Spoom::Model::Visibility < ::T::Enum + enums do + Private = new + Protected = new + Public = new + end +end + +# pkg:gem/spoom#lib/spoom/parse.rb:7 +class Spoom::ParseError < ::Spoom::Error; end + +# A Poset is a set of elements with a partial order relation. +# +# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. +# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. +# +# pkg:gem/spoom#lib/spoom/poset.rb:10 +class Spoom::Poset + extend T::Generic + + E = type_member { { upper: Object } } + + # pkg:gem/spoom#lib/spoom/poset.rb:14 + sig { void } + def initialize; end + + # Get the POSet element for a given value + # + # Raises if the element is not found + # + # pkg:gem/spoom#lib/spoom/poset.rb:22 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def [](value); end + + # Add a direct edge from one element to another + # + # Transitive edges (transitive closure) are automatically computed. + # Adds the elements if they don't exist. + # If the direct edge already exists, nothing is done. + # + # pkg:gem/spoom#lib/spoom/poset.rb:50 + sig { params(from: E, to: E).void } + def add_direct_edge(from, to); end + + # Add an element to the POSet + # + # pkg:gem/spoom#lib/spoom/poset.rb:31 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def add_element(value); end + + # Is there a direct edge from `from` to `to`? + # + # pkg:gem/spoom#lib/spoom/poset.rb:97 + sig { params(from: E, to: E).returns(T::Boolean) } + def direct_edge?(from, to); end + + # Is there an edge (direct or indirect) from `from` to `to`? + # + # pkg:gem/spoom#lib/spoom/poset.rb:88 + sig { params(from: E, to: E).returns(T::Boolean) } + def edge?(from, to); end + + # Is the given value a element in the POSet? + # + # pkg:gem/spoom#lib/spoom/poset.rb:40 + sig { params(value: E).returns(T::Boolean) } + def element?(value); end + + # Show the POSet as a DOT graph using xdot (used for debugging) + # + # pkg:gem/spoom#lib/spoom/poset.rb:103 + sig { params(direct: T::Boolean, transitive: T::Boolean).void } + def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end + + # Return the POSet as a DOT graph + # + # pkg:gem/spoom#lib/spoom/poset.rb:112 + sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } + def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end +end + +# An element in a POSet +# +# pkg:gem/spoom#lib/spoom/poset.rb:133 +class Spoom::Poset::Element + include ::Comparable + extend T::Generic + + E = type_member { { upper: Object } } + + # pkg:gem/spoom#lib/spoom/poset.rb:145 + sig { params(value: E).void } + def initialize(value); end + + # pkg:gem/spoom#lib/spoom/poset.rb:154 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } + def <=>(other); end + + # Direct and indirect ancestors of this element + # + # pkg:gem/spoom#lib/spoom/poset.rb:173 + sig { returns(T::Array[E]) } + def ancestors; end + + # Direct children of this element + # + # pkg:gem/spoom#lib/spoom/poset.rb:179 + sig { returns(T::Array[E]) } + def children; end + + # Direct and indirect descendants of this element + # + # pkg:gem/spoom#lib/spoom/poset.rb:185 + sig { returns(T::Array[E]) } + def descendants; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # pkg:gem/spoom#lib/spoom/poset.rb:142 + def dfroms; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # pkg:gem/spoom#lib/spoom/poset.rb:142 + sig { returns(T::Set[Spoom::Poset::Element[E]]) } + def dtos; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # pkg:gem/spoom#lib/spoom/poset.rb:142 + def froms; end + + # Direct parents of this element + # + # pkg:gem/spoom#lib/spoom/poset.rb:167 + sig { returns(T::Array[E]) } + def parents; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # pkg:gem/spoom#lib/spoom/poset.rb:142 + def tos; end + + # The value held by this element + # + # pkg:gem/spoom#lib/spoom/poset.rb:138 + sig { returns(E) } + def value; end +end + +# pkg:gem/spoom#lib/spoom/poset.rb:11 +class Spoom::Poset::Error < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/printer.rb:7 +class Spoom::Printer + include ::Spoom::Colorize + + # pkg:gem/spoom#lib/spoom/printer.rb:14 + 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` + # + # pkg:gem/spoom#lib/spoom/printer.rb:75 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # pkg:gem/spoom#lib/spoom/printer.rb:28 + sig { void } + def dedent; end + + # Increase indent level + # + # pkg:gem/spoom#lib/spoom/printer.rb:22 + sig { void } + def indent; end + + # pkg:gem/spoom#lib/spoom/printer.rb:11 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # pkg:gem/spoom#lib/spoom/printer.rb:11 + def out=(_arg0); end + + # Print `string` into `out` + # + # pkg:gem/spoom#lib/spoom/printer.rb:34 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # + # Does not use colors unless `@colors`. + # + # pkg:gem/spoom#lib/spoom/printer.rb:44 + sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } + def print_colored(string, *color); end + + # Print `string` with indent and newline + # + # pkg:gem/spoom#lib/spoom/printer.rb:59 + sig { params(string: T.nilable(::String)).void } + def printl(string); end + + # Print a new line into `out` + # + # pkg:gem/spoom#lib/spoom/printer.rb:53 + sig { void } + def printn; end + + # Print an indent space into `out` + # + # pkg:gem/spoom#lib/spoom/printer.rb:69 + sig { void } + def printt; end +end + +# pkg:gem/spoom#lib/spoom/rbs.rb:5 +module Spoom::RBS; end + +# pkg:gem/spoom#lib/spoom/rbs.rb:71 +class Spoom::RBS::Annotation < ::Spoom::RBS::Comment; end + +# pkg:gem/spoom#lib/spoom/rbs.rb:57 +class Spoom::RBS::Comment + # pkg:gem/spoom#lib/spoom/rbs.rb:65 + sig { params(string: ::String, location: ::Prism::Location).void } + def initialize(string, location); end + + # pkg:gem/spoom#lib/spoom/rbs.rb:62 + sig { returns(::Prism::Location) } + def location; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:59 + sig { returns(::String) } + def string; end +end + +# pkg:gem/spoom#lib/spoom/rbs.rb:6 +class Spoom::RBS::Comments + # pkg:gem/spoom#lib/spoom/rbs.rb:14 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:8 + sig { returns(T::Array[::Spoom::RBS::Annotation]) } + def annotations; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:25 + sig { returns(T::Array[::Spoom::RBS::Annotation]) } + def class_annotations; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:20 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:39 + sig { returns(T::Array[::Spoom::RBS::Annotation]) } + def method_annotations; end + + # pkg:gem/spoom#lib/spoom/rbs.rb:11 + sig { returns(T::Array[::Spoom::RBS::Signature]) } + def signatures; end +end + +# pkg:gem/spoom#lib/spoom/rbs.rb:75 +module Spoom::RBS::ExtractRBSComments + # pkg:gem/spoom#lib/spoom/rbs.rb:77 + sig { params(node: ::Prism::Node).returns(::Spoom::RBS::Comments) } + def node_rbs_comments(node); end +end + +# pkg:gem/spoom#lib/spoom/rbs.rb:72 +class Spoom::RBS::Signature < ::Spoom::RBS::Comment; end + +# pkg:gem/spoom#lib/spoom/rbs.rb:73 +class Spoom::RBS::TypeAlias < ::Spoom::RBS::Comment; end + +# pkg:gem/spoom#lib/spoom.rb:8 +Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/config.rb:5 +module Spoom::Sorbet; end + +# pkg:gem/spoom#lib/spoom/sorbet.rb:33 +Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet.rb:30 +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" +# ``` +# +# pkg:gem/spoom#lib/spoom/sorbet/config.rb:26 +class Spoom::Sorbet::Config + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:36 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def allowed_extensions; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def allowed_extensions=(_arg0); end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def ignore; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def ignore=(_arg0); end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:33 + sig { returns(T::Boolean) } + def no_stdlib; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:33 + 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" + # ~~~ + # + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:64 + sig { returns(::String) } + def options_string; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + sig { returns(T::Array[::String]) } + def paths; end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:30 + def paths=(_arg0); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:44 + sig { params(source: ::Spoom::Sorbet::Config).void } + def initialize_copy(source); end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:75 + sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } + def parse_file(sorbet_config_path); end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:80 + sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } + def parse_string(sorbet_config); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:146 + sig { params(line: ::String).returns(T::Boolean) } + def parse_bool_option(line); end + + # pkg:gem/spoom#lib/spoom/sorbet/config.rb:141 + sig { params(line: ::String).returns(::String) } + def parse_option(line); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/config.rb:27 +Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/sorbet.rb:15 +class Spoom::Sorbet::Error < ::Spoom::Error + # pkg:gem/spoom#lib/spoom/sorbet.rb:23 + sig { params(message: ::String, result: ::Spoom::ExecResult).void } + def initialize(message, result); end + + # pkg:gem/spoom#lib/spoom/sorbet.rb:20 + sig { returns(::Spoom::ExecResult) } + def result; end +end + +# pkg:gem/spoom#lib/spoom/sorbet.rb:16 +class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet.rb:17 +class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:8 +module Spoom::Sorbet::Errors + class << self + # pkg:gem/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 + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:18 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(::REXML::Document) } + def to_junit_xml(errors); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:9 +Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:149 +class Spoom::Sorbet::Errors::Error + include ::Comparable + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:166 + 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 + # + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:177 + sig { params(other: T.untyped).returns(::Integer) } + def <=>(other); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:156 + def code; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:153 + sig { returns(T.nilable(::String)) } + def file; end + + # Other files associated with the error + # + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:163 + sig { returns(T::Set[::String]) } + def files_from_error_sections; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:156 + sig { returns(T.nilable(::Integer)) } + def line; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:153 + def message; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:159 + sig { returns(T::Array[::String]) } + def more; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:189 + sig { returns(::REXML::Element) } + def to_junit_xml_element; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:184 + sig { returns(::String) } + def to_s; end +end + +# Parse errors from Sorbet output +# +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:47 +class Spoom::Sorbet::Errors::Parser + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:67 + sig { params(error_url_base: ::String).void } + def initialize(error_url_base: T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:74 + sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse(output); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:138 + sig { params(line: ::String).void } + def append_error(line); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:130 + sig { void } + def close_error; end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:97 + sig { params(error_url_base: ::String).returns(::Regexp) } + def error_line_match_regexp(error_url_base); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:114 + sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } + def match_error_line(line); end + + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:123 + sig { params(error: ::Spoom::Sorbet::Errors::Error).void } + def open_error(error); end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/errors.rb:60 + 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 + +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:50 +Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/sorbet/errors.rb:48 +class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet.rb:31 +Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet.rb:32 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet.rb:35 +Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:6 +module Spoom::Sorbet::Metrics + class << self + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:9 + sig { params(files: T::Array[::String]).returns(Spoom::Counters) } + def collect_code_metrics(files); end + end +end + +# Collects metrics about how Sorbet is used in the codebase. +# +# This approach is different from the metrics file we get directly from Sorbet. +# +# This visitor actually visits the codebase and collects metrics about the amount of signatures, `T.` calls, +# and other metrics. It also knows about RBS comments. +# +# On the other hand, the metrics file is a snapshot of the metrics at type checking time and knows about +# is calls are typed, how many assertions are done, etc. +# +# pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:34 +class Spoom::Sorbet::Metrics::CodeMetricsVisitor < ::Spoom::Visitor + include ::Spoom::RBS::ExtractRBSComments + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:38 + sig { params(counters: Spoom::Counters).void } + def initialize(counters); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:49 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:124 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:75 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:99 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:83 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:91 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:213 + sig { returns(T::Array[::Prism::CallNode]) } + def collect_last_srb_sigs; end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:220 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).returns(::String) } + def node_key(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:167 + sig { params(node: ::Prism::CallNode).void } + def visit_attr_accessor(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:151 + sig do + params( + node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + block: T.proc.void + ).void + end + def visit_scope(node, &block); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:187 + sig { params(node: ::Prism::CallNode).void } + def visit_sig(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/code_metrics_visitor.rb:197 + sig { params(node: ::Prism::CallNode).void } + def visit_type_member(node); end +end + +# pkg:gem/spoom#lib/spoom/sorbet/metrics/metrics_file_parser.rb:9 +module Spoom::Sorbet::Metrics::MetricsFileParser + class << self + # Raises if `path` doesn't point to a valid file that we have access to (see `File.read` for details) + # + # pkg:gem/spoom#lib/spoom/sorbet/metrics/metrics_file_parser.rb:15 + sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_file(path, prefix = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/metrics_file_parser.rb:25 + sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(Spoom::Counters) } + def parse_hash(obj, prefix = T.unsafe(nil)); end + + # pkg:gem/spoom#lib/spoom/sorbet/metrics/metrics_file_parser.rb:20 + sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_string(string, prefix = T.unsafe(nil)); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/metrics/metrics_file_parser.rb:10 +Spoom::Sorbet::Metrics::MetricsFileParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet.rb:36 +Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/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 + # + # pkg:gem/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 + # + # pkg:gem/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 true if the passed content contains a valid sigil + # + # pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:49 + sig { params(content: ::String).returns(T::Boolean) } + def contains_valid_sigil?(content); end + + # returns a string containing the strictness of a sigil in a file at the passed path + # * returns nil if no sigil + # + # pkg:gem/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 + # + # pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:31 + 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) + # + # pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:43 + 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 + # + # pkg:gem/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) + # + # pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:37 + sig { params(strictness: ::String).returns(T::Boolean) } + def valid_strictness?(strictness); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:26 +Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:11 +Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:10 +Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:15 +Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:13 +Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:14 +Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:12 +Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/sorbet/sigils.rb:17 +Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:6 +module Spoom::Sorbet::Translate + class << self + # Converts all the RBS comments in the given Ruby code to `sig` nodes. + # It also handles type members and class annotations. + # + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:57 + sig do + params( + ruby_contents: ::String, + file: ::String, + max_line_length: T.nilable(::Integer), + overloads_strategy: ::Symbol + ).returns(::String) + end + def rbs_comments_to_sorbet_sigs(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil)); end + + # Converts all `T.let` and `T.cast` nodes to RBS comments in the given Ruby code. + # It also handles type members and class annotations. + # + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:77 + sig do + params( + ruby_contents: ::String, + file: ::String, + translate_t_let: T::Boolean, + translate_t_cast: T::Boolean, + translate_t_bind: T::Boolean, + translate_t_must: T::Boolean, + translate_t_unsafe: T::Boolean + ).returns(::String) + end + def sorbet_assertions_to_rbs_comments(ruby_contents, file:, translate_t_let: T.unsafe(nil), translate_t_cast: T.unsafe(nil), translate_t_bind: T.unsafe(nil), translate_t_must: T.unsafe(nil), translate_t_unsafe: T.unsafe(nil)); end + + # Converts all `sig` nodes to RBS comments in the given Ruby code. + # It also handles type members and class annotations. + # + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:37 + sig do + params( + ruby_contents: ::String, + file: ::String, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer), + translate_generics: T::Boolean, + translate_helpers: T::Boolean, + translate_abstract_methods: T::Boolean + ).returns(::String) + end + def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end + + # Deletes all `sig` nodes from the given Ruby code. + # It doesn't handle type members and class annotations. + # + # pkg:gem/spoom#lib/spoom/sorbet/translate.rb:22 + sig { params(ruby_contents: ::String, file: ::String).returns(::String) } + def strip_sorbet_sigs(ruby_contents, file:); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/translate.rb:16 +class Spoom::Sorbet::Translate::Error < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:7 +class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs < ::Spoom::Sorbet::Translate::Translator + include ::Spoom::RBS::ExtractRBSComments + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:40 + sig do + params( + ruby_contents: ::String, + file: ::String, + max_line_length: T.nilable(::Integer), + overloads_strategy: ::Symbol + ).void + end + def initialize(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:94 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:64 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:88 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:72 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:54 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:80 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:352 + sig do + params( + node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + constant_regex: ::Regexp + ).returns(T::Boolean) + end + def already_extends?(node, constant_regex); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:227 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).void } + def apply_class_annotations(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:328 + sig { params(annotations: T::Array[::Spoom::RBS::Annotation], sig: ::RBI::Sig).void } + def apply_member_annotations(annotations, sig); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:204 + sig do + params( + signatures: T::Array[::Spoom::RBS::Signature], + method_name: ::String, + location: ::String + ).returns(T::Array[::Spoom::RBS::Signature]) + end + def apply_overloads_strategy(signatures, method_name:, location:); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:404 + sig { params(comments: T::Array[::Prism::Comment]).void } + def apply_type_aliases(comments); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:368 + sig { params(comments: T::Array[::Prism::Comment]).returns(T::Array[::Spoom::RBS::TypeAlias]) } + def collect_type_aliases(comments); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:156 + sig { params(def_node: ::Prism::DefNode, comments: ::Spoom::RBS::Comments).void } + def rewrite_def(def_node, comments); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:112 + sig { params(node: ::Prism::CallNode).void } + def visit_attr(node); end + + class << self + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:27 + sig { params(source: ::String).returns(T::Boolean) } + def contains_rbs_syntax?(source); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:32 + sig do + params( + ruby_contents: ::String, + file: ::String, + max_line_length: T.nilable(::Integer), + overloads_strategy: ::Symbol + ).returns(::String) + end + def rewrite_if_needed(ruby_contents, file:, max_line_length: T.unsafe(nil), overloads_strategy: T.unsafe(nil)); end + end +end + +# pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:23 +Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::ALLOWED_OVERLOAD_STRATEGIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:10 +Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::RBS_ANNOTATION_MARKERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/spoom#lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb:20 +Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs::RBS_REWRITE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Translates Sorbet assertions to RBS comments. +# +# pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:8 +class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet::Translate::Translator + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:20 + sig do + params( + ruby_contents: ::String, + file: ::String, + translate_t_let: T::Boolean, + translate_t_cast: T::Boolean, + translate_t_bind: T::Boolean, + translate_t_must: T::Boolean, + translate_t_unsafe: T::Boolean + ).void + end + def initialize(ruby_contents, file:, translate_t_let: T.unsafe(nil), translate_t_cast: T.unsafe(nil), translate_t_bind: T.unsafe(nil), translate_t_must: T.unsafe(nil), translate_t_unsafe: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:49 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:40 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:176 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def at_end_of_line?(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:118 + sig { params(call: ::Prism::CallNode).returns(::String) } + def build_rbs_annotation(call); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:216 + sig { params(assign: ::Prism::Node, value: ::Prism::Node).returns(::String) } + def dedent_value(assign, value); end + + # Extract any trailing comment after the node + # Returns [comment_text, comment_end_offset] or [nil, nil] if no comment or RBS annotation + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:196 + sig { params(node: ::Prism::Node).returns([T.nilable(::String), T.nilable(::Integer)]) } + def extract_trailing_comment(node); end + + # Check if the node has an RBS annotation comment (#:) after it + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:185 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def has_rbs_annotation?(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:71 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def maybe_translate_assertion(node); end + + # Is this node a `T` or `::T` constant? + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:143 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # Is this node a `T.let` or `T.cast`? + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:156 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def translatable_annotation?(node); end +end + +# pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb:9 +Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments::LINE_BREAK = T.let(T.unsafe(nil), Integer) + +# Converts all `sig` nodes to RBS comments in the given Ruby code. +# It also handles type members and class annotations. +# +# pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:9 +class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Translate::Translator + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:19 + sig do + params( + ruby_contents: ::String, + file: ::String, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer), + translate_generics: T::Boolean, + translate_helpers: T::Boolean, + translate_abstract_methods: T::Boolean + ).void + end + def initialize(ruby_contents, file:, positional_names:, max_line_length: T.unsafe(nil), translate_generics: T.unsafe(nil), translate_helpers: T.unsafe(nil), translate_abstract_methods: T.unsafe(nil)); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:100 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:46 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:119 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:64 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:52 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:58 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:233 + sig do + params( + parent: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + node: ::Prism::CallNode + ).void + end + def apply_class_annotation(parent, node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:277 + sig { params(sigs: T::Array[[::Prism::CallNode, ::RBI::Sig]]).void } + def apply_member_annotations(sigs); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:313 + sig { params(node: ::Prism::ConstantWriteNode).returns(::String) } + def build_type_member_string(node); end + + # Collects the last signatures visited and clears the current list + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:384 + sig { returns(T::Array[[::Prism::CallNode, ::RBI::Sig]]) } + def collect_last_sigs; end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:371 + sig { void } + def delete_extend_t_generics; end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:359 + sig { void } + def delete_extend_t_helpers; end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:391 + sig { params(indent: ::Integer, block: T.proc.params(arg0: ::RBI::RBSPrinter).void).returns(::String) } + def rbs_print(indent, &block); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:191 + sig { params(node: ::Prism::CallNode).void } + def visit_attr(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:215 + sig { params(node: ::Prism::CallNode).void } + def visit_extend(node); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:138 + sig do + params( + node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + block: T.proc.void + ).void + end + def visit_scope(node, &block); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb:179 + sig { params(node: ::Prism::CallNode).void } + def visit_sig(node); end +end + +# Deletes all `sig` nodes from the given Ruby code. +# It doesn't handle type members and class annotations. +# +# pkg:gem/spoom#lib/spoom/sorbet/translate/strip_sorbet_sigs.rb:9 +class Spoom::Sorbet::Translate::StripSorbetSigs < ::Spoom::Sorbet::Translate::Translator + # @override + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/strip_sorbet_sigs.rb:12 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:8 +class Spoom::Sorbet::Translate::Translator < ::Spoom::Visitor + abstract! + + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:10 + sig { params(ruby_contents: ::String, file: ::String).void } + def initialize(ruby_contents, file:); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:30 + sig { returns(::String) } + def rewrite; end + + private + + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:55 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_line_end(offset); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:49 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_line_start(offset); end + + # Consume the next blank line if any + # + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:62 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_new_line(offset); end + + # pkg:gem/spoom#lib/spoom/sorbet/translate/translator.rb:39 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def sorbet_sig?(node); end +end + +# This module provides a simple API to rewrite source code. +# +# Using a `Rewriter`, you can build a list of changes to apply to a source file +# and apply them all at once. Edits are applied from bottom to top, so that the +# line numbers are not remapped after each edit. +# +# The source code is represented as an array of bytes, so that it can be +# manipulated in place. The client is responsible for `string <-> bytes` +# conversions and encoding handling. +# +# ```ruby +# bytes = "def foo; end".bytes +# +# rewriter = Spoom::Source::Rewriter.new +# rewriter << Spoom::Source::Replace.new(4, 6, "baz") +# rewriter << Spoom::Source::Insert.new(0, "def bar; end\n") +# rewriter.rewrite!(bytes) +# +# puts bytes.pack("C*") # => "def bar; end\ndef baz; end" +# ``` +# +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:25 +module Spoom::Source; end + +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:114 +class Spoom::Source::Delete < ::Spoom::Source::Edit + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:119 + sig { params(from: ::Integer, to: ::Integer).void } + def initialize(from, to); end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:128 + sig { override.params(bytes: T::Array[T.untyped]).void } + def apply(bytes); end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:116 + sig { returns(::Integer) } + def from; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:137 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:116 + def to; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:143 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:29 +class Spoom::Source::Edit + abstract! + + # @abstract + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:32 + sig { abstract.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end + + # @abstract + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:36 + sig { abstract.returns([::Integer, ::Integer]) } + def range; end +end + +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:39 +class Spoom::Source::Insert < ::Spoom::Source::Edit + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:47 + sig { params(position: ::Integer, text: ::String).void } + def initialize(position, text); end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:56 + sig { override.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:41 + sig { returns(::Integer) } + def position; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:65 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:44 + sig { returns(::String) } + def text; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:71 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:26 +class Spoom::Source::PositionError < ::Spoom::Error; end + +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:76 +class Spoom::Source::Replace < ::Spoom::Source::Edit + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:84 + sig { params(from: ::Integer, to: ::Integer, text: ::String).void } + def initialize(from, to, text); end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:94 + sig { override.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:78 + sig { returns(::Integer) } + def from; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:103 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:81 + sig { returns(::String) } + def text; end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:78 + def to; end + + # @override + # + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:109 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/spoom#lib/spoom/source/rewriter.rb:148 +class Spoom::Source::Rewriter + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:150 + sig { void } + def initialize; end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:155 + sig { params(other: ::Spoom::Source::Edit).void } + def <<(other); end + + # pkg:gem/spoom#lib/spoom/source/rewriter.rb:160 + sig { params(bytes: T::Array[::Integer]).void } + def rewrite!(bytes); end +end + +# pkg:gem/spoom#lib/spoom/timeline.rb:5 +class Spoom::Timeline + # pkg:gem/spoom#lib/spoom/timeline.rb:7 + sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } + def initialize(context, from, to); end + + # Return one commit for each date in `dates` + # + # pkg:gem/spoom#lib/spoom/timeline.rb:34 + 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` + # + # pkg:gem/spoom#lib/spoom/timeline.rb:21 + sig { returns(T::Array[::Time]) } + def months; end + + # Return one commit for each month between `from` and `to` + # + # pkg:gem/spoom#lib/spoom/timeline.rb:15 + sig { returns(T::Array[::Spoom::Git::Commit]) } + def ticks; end +end + +# pkg:gem/spoom#lib/spoom/version.rb:5 +Spoom::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/spoom#lib/spoom/visitor.rb:7 +class Spoom::Visitor < ::Prism::Visitor + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:16 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:22 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:28 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:34 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:40 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:46 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:52 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:58 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:64 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:70 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:76 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:82 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:88 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:94 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:100 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:106 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:112 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:118 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:124 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:130 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:136 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:142 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:148 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:154 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:160 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:10 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:166 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:172 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:178 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:184 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:190 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:196 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:202 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:208 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:214 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:220 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:226 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:232 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:238 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:244 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:250 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:256 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:262 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:268 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:274 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:280 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:286 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:292 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:298 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:304 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:310 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:316 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:322 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:328 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:334 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:340 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:346 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:352 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:358 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:364 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:370 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:376 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:382 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:388 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:394 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:400 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:406 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:412 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:418 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:424 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:430 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:436 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:442 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:448 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:454 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:460 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:466 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:472 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:478 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:484 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:490 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:496 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:502 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:508 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:514 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:520 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:526 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:532 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:538 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:544 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:550 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:556 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:562 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:568 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:574 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:580 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:586 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:592 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:598 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:604 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:610 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:616 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:622 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:628 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:634 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:640 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:646 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:652 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:658 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:664 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:670 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:676 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:682 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:688 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:694 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:700 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:706 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:712 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:718 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:724 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:730 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:736 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:742 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:748 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:754 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:760 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:766 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:772 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:778 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:784 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:790 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:796 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:802 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:808 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:814 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:820 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:826 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:832 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:838 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:844 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:850 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:856 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:862 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:868 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:874 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:880 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:886 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:892 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # @override + # + # pkg:gem/spoom#lib/spoom/visitor.rb:898 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end +end diff --git a/sorbet/rbi/gems/tapioca@0.19.1.rbi b/sorbet/rbi/gems/tapioca@0.19.1.rbi new file mode 100644 index 00000000..e95c27b8 --- /dev/null +++ b/sorbet/rbi/gems/tapioca@0.19.1.rbi @@ -0,0 +1,3556 @@ +# 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 + +# pkg:gem/tapioca#lib/tapioca/helpers/git_attributes.rb:4 +class GitAttributes + class << self + # pkg:gem/tapioca#lib/tapioca/helpers/git_attributes.rb:7 + sig { params(path: ::Pathname).void } + def create_generated_attribute_file(path); end + + # pkg:gem/tapioca#lib/tapioca/helpers/git_attributes.rb:14 + sig { params(path: ::Pathname).void } + def create_vendored_attribute_file(path); end + + private + + # pkg:gem/tapioca#lib/tapioca/helpers/git_attributes.rb:23 + sig { params(path: ::Pathname, content: ::String).void } + def create_gitattributes_file(path, content); end + end +end + +# We need to do the alias-method-chain dance since Bootsnap does the same, +# and prepended modules and alias-method-chain don't play well together. +# +# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! +# That's because RubyGems does alias-method-chain for Kernel#require and such, +# so, if Bootsnap were to do prepend, it might end up breaking RubyGems. +# +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:101 +class Module + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:95 + def append_features(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:46 + def autoload(const_name, path); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:103 + def const_added(cname); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:105 + def extend_object(obj); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:85 + def prepend_features(constant); end +end + +# pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:4 +module RBI; end + +# pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:5 +class RBI::Tree < ::RBI::NodeWithComments + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:30 + 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 + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:37 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:47 + sig { params(name: ::String).void } + def create_extend(name); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:42 + sig { params(name: ::String).void } + def create_include(name); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:63 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: T.nilable(::String), + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).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), &block); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:52 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:23 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:7 + sig do + params( + constant: T::Module[T.anything], + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_path(constant, &block); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:57 + 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 + + private + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:100 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:95 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# pkg:gem/tapioca#lib/tapioca/rbi_ext/model.rb:110 +class RBI::TypedParam < ::T::Struct + const :param, ::RBI::Param + const :type, ::String +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:5 +module T::Generic + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:13 + def [](*types); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# This module intercepts calls to generic type instantiations and type variable definitions. +# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used +# to look up the original call details when we are trying to do code generation. +# +# We are interested in the data of the `[]`, `type_member` and `type_template` calls which +# are all needed to generate good generic information at runtime. +# +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:12 +module T::Generic::TypeStoragePatch + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:13 + def [](*types); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:52 +module T::Helpers + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:54 + def requires_ancestor(&block); end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:28 +module T::Private::Methods + class << self + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:30 + def finalize_proc(decl); end + end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:29 +module T::Private::Methods::ProcBindPatch + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:30 + def finalize_proc(decl); end +end + +class T::Types::Proc < ::T::Types::Base + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:7 + def initialize(arg_types, returns, bind = T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:15 + def name; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:6 +module T::Types::ProcBindPatch + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:7 + def initialize(arg_types, returns, bind = T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/proc_bind_patch.rb:15 + def name; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/name_patch.rb:6 +class T::Types::Simple < ::T::Types::Base + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:70 + def name; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:65 +module T::Types::Simple::GenericPatch + # This method intercepts calls to the `name` method for simple types, so that + # it can ask the name to the type if the type is generic, since, by this point, + # we've created a clone of that type with the `name` method returning the + # appropriate name for that specific concrete type. + # + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:70 + def name; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/name_patch.rb:7 +module T::Types::Simple::NamePatch + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/name_patch.rb:8 + def name; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:87 +module T::Utils::Private + class << self + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:89 + def coerce_and_check_module_types(val, check_val, check_module_type); end + end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:88 +module T::Utils::Private::PrivateCoercePatch + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:89 + def coerce_and_check_module_types(val, check_val, check_module_type); end +end + +# A package URL, or _purl_, is a URL string used to +# identify and locate a software package in a mostly universal and uniform way +# across programing languages, package managers, packaging conventions, tools, +# APIs and databases. +# +# A purl is a URL composed of seven components: +# +# ``` +# scheme:type/namespace/name@version?qualifiers#subpath +# ``` +# +# For example, +# the package URL for this Ruby package at version 0.1.0 is +# `pkg:ruby/mattt/packageurl-ruby@0.1.0`. +# +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:4 +module Tapioca; end + +# pkg:gem/tapioca#lib/tapioca.rb:18 +Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/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`. +# +# pkg:gem/tapioca#lib/tapioca/bundler_ext/auto_require_hook.rb:9 +module Tapioca::BundlerExt::AutoRequireHook + requires_ancestor { Bundler::Dependency } + + # pkg:gem/tapioca#lib/tapioca/bundler_ext/auto_require_hook.rb:38 + sig { returns(T.untyped) } + def autorequire; end + + class << self + # pkg:gem/tapioca#lib/tapioca/bundler_ext/auto_require_hook.rb:23 + def enabled?; end + + # pkg:gem/tapioca#lib/tapioca/bundler_ext/auto_require_hook.rb:19 + sig { params(name: T.untyped).returns(T::Boolean) } + def excluded?(name); end + + # pkg:gem/tapioca#lib/tapioca/bundler_ext/auto_require_hook.rb:28 + 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 + +# pkg:gem/tapioca#lib/tapioca.rb:38 +Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:37 +Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:36 +Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/cli.rb:5 +class Tapioca::Cli < ::Thor + include ::Tapioca::CliHelper + include ::Tapioca::ConfigHelper + include ::Tapioca::EnvHelper + + # pkg:gem/tapioca#lib/tapioca/cli.rb:373 + def __print_version; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:355 + def annotations; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:327 + def check_shims; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:46 + def configure; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:146 + def dsl(*constant_or_paths); end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:269 + def gem(*gems); end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:27 + def init; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:57 + def require; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:74 + def todo; end + + private + + # pkg:gem/tapioca#lib/tapioca/cli.rb:398 + def print_init_next_steps; end + + class << self + # Indicates that we are running from the LSP, set using the `addon_mode!` method + # + # pkg:gem/tapioca#lib/tapioca/cli.rb:382 + def addon_mode; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:385 + sig { void } + def addon_mode!; end + + # pkg:gem/tapioca#lib/tapioca/cli.rb:390 + sig { returns(T::Boolean) } + def exit_on_failure?; end + end +end + +# pkg:gem/tapioca#lib/tapioca/cli.rb:10 +Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/cli_helper.rb:5 +module Tapioca::CliHelper + requires_ancestor { Thor::Shell } + + # pkg:gem/tapioca#lib/tapioca/helpers/cli_helper.rb:32 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } + def netrc_file(options); end + + # pkg:gem/tapioca#lib/tapioca/helpers/cli_helper.rb:25 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } + def rbi_formatter(options); end + + # pkg:gem/tapioca#lib/tapioca/helpers/cli_helper.rb:11 + sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } + def say_error(message = T.unsafe(nil), *color); end +end + +# pkg:gem/tapioca#lib/tapioca/commands.rb:5 +module Tapioca::Commands; end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:6 +class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:15 + sig do + params( + requested_constants: T::Array[::String], + requested_paths: T::Array[::Pathname], + outpath: ::Pathname, + only: T::Array[::String], + exclude: T::Array[::String], + file_header: T::Boolean, + tapioca_path: ::String, + skip_constant: T::Array[::String], + quiet: T::Boolean, + verbose: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + gem_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + app_root: ::String, + halt_upon_load_error: T::Boolean, + compiler_options: T::Hash[::String, T.untyped], + lsp_addon: T::Boolean + ).void + end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + + private + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:88 + sig { returns(T::Array[::String]) } + def all_requested_constants; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:284 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:208 + 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 + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:150 + sig do + params( + constant_names: T::Array[::String], + ignore_missing: T::Boolean + ).returns(T::Array[T::Module[T.anything]]) + end + def constantize(constant_names, ignore_missing: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:175 + sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def constantize_compilers(compiler_names); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:344 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:111 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:247 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:136 + sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:339 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:60 + sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } + def generate_dsl_rbi_files(outpath, quiet:); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:98 + sig { void } + def load_application; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:226 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:93 + sig { returns(::Tapioca::Dsl::Pipeline) } + def pipeline; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:235 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:334 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:315 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:293 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:195 + sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } + def resolve(name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:322 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_dsl.rb:252 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:6 +class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:15 + sig do + params( + gem_names: T::Array[::String], + exclude: T::Array[::String], + include_dependencies: T::Boolean, + prerequire: T.nilable(::String), + postrequire: ::String, + typed_overrides: T::Hash[::String, ::String], + outpath: ::Pathname, + file_header: T::Boolean, + include_doc: T::Boolean, + include_loc: T::Boolean, + include_exported_rbis: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + dsl_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean, + lsp_addon: T.nilable(T::Boolean), + verbose: T.nilable(T::Boolean) + ).void + end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), lsp_addon: T.unsafe(nil), verbose: T.unsafe(nil)); end + + private + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:185 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:246 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:64 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:180 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:228 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:192 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:234 + sig { returns(T::Hash[::String, ::String]) } + def expected_rbis; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:197 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:241 + sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } + def gem_rbi_filename(gem_name, version); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:251 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } + def merge_with_exported_rbi(gem, file); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:222 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:132 + sig { void } + def perform_additions; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:105 + sig { void } + def perform_removals; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:175 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # pkg:gem/tapioca#lib/tapioca/commands/abstract_gem.rb:202 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + +# pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:6 +class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:8 + sig do + params( + central_repo_root_uris: T::Array[::String], + auth: T.nilable(::String), + netrc_file: T.nilable(::String), + central_repo_index_path: ::String, + typed_overrides: T::Hash[::String, ::String] + ).void + end + def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end + + private + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:190 + sig { params(name: ::String, content: ::String).returns(::String) } + def add_header(name, content); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:210 + sig { params(name: ::String, content: ::String).returns(::String) } + def apply_typed_override(name, content); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:30 + sig { override.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:128 + sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).returns(T::Boolean) } + def fetch_annotation(repo_uris, gem_info); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:105 + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } + def fetch_annotations(project_gems); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:149 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_file(repo_uri, path); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:166 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_http_file(repo_uri, path); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:94 + sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(::Tapioca::RepoIndex)) } + def fetch_index(repo_uri, repo_number:); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:73 + sig { returns(T::Hash[::String, ::Tapioca::RepoIndex]) } + def fetch_indexes; end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:158 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_local_file(repo_uri, path); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:222 + sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } + def filter_versions(gem_version, content); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:41 + sig { returns(T::Array[::Tapioca::GemInfo]) } + def list_gemfile_gems; end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:230 + sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } + def merge_files(gem_name, contents); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:52 + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } + def remove_expired_annotations(project_gems); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:257 + sig { returns(T::Hash[::String, T.nilable(::String)]) } + def repo_tokens; end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:285 + sig { params(path: ::String, repo_uri: ::String, message: ::String).void } + def say_http_error(path, repo_uri, message:); end + + # pkg:gem/tapioca#lib/tapioca/commands/annotations.rb:269 + sig { params(repo_uri: ::String).returns(T.nilable(::String)) } + def token_for(repo_uri); end +end + +# pkg:gem/tapioca#lib/tapioca/commands/check_shims.rb:6 +class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # pkg:gem/tapioca#lib/tapioca/commands/check_shims.rb:11 + sig do + params( + gem_rbi_dir: ::String, + dsl_rbi_dir: ::String, + annotations_rbi_dir: ::String, + shim_rbi_dir: ::String, + todo_rbi_file: ::String, + payload: T::Boolean, + number_of_workers: T.nilable(::Integer) + ).void + end + def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/check_shims.rb:34 + sig { override.void } + def execute; end +end + +# @abstract +# +# pkg:gem/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! + + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:19 + sig { void } + def initialize; end + + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:43 + sig { returns(::Thor::Actions) } + def file_writer; end + + # @final + # + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:25 + sig(:final) { void } + def run; end + + private + + # pkg:gem/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 + + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:38 + sig { params(command: ::Symbol, args: ::String).returns(::String) } + def default_command(command, *args); end + + # @abstract + # + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:35 + sig { abstract.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/command.rb:51 + sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } + def remove_file(path, verbose: T.unsafe(nil)); end +end + +# pkg:gem/tapioca#lib/tapioca/commands/command.rb:11 +class Tapioca::Commands::Command::FileWriter < ::Thor + include ::Thor::Actions + extend ::Thor::Actions::ClassMethods +end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/commands/command_without_tracker.rb:6 +class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command + abstract! + + # pkg:gem/tapioca#lib/tapioca/commands/command_without_tracker.rb:12 + sig { void } + def initialize; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/configure.rb:6 +class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:8 + sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } + def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end + + private + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:75 + sig { void } + def create_binstub; end + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:65 + sig { void } + def create_post_require; end + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:35 + sig { void } + def create_sorbet_config; end + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:46 + sig { void } + def create_tapioca_config; end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:27 + sig { override.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:88 + sig { returns(::Bundler::Installer) } + def installer; end + + # pkg:gem/tapioca#lib/tapioca/commands/configure.rb:93 + sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } + def spec; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/dsl_compiler_list.rb:6 +class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/dsl_compiler_list.rb:11 + sig { override.void } + def execute; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:6 +class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/dsl_generate.rb:11 + sig { override.void } + def execute; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/dsl_verify.rb:6 +class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/dsl_verify.rb:11 + sig { override.void } + def execute; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:6 +class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:11 + sig { override.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:70 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + dependencies: T::Array[::Tapioca::Gemfile::GemSpec] + ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) + end + def gem_dependencies(gem, dependencies = T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/commands/gem_generate.rb:52 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end +end + +# pkg:gem/tapioca#lib/tapioca/commands/gem_sync.rb:6 +class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/gem_sync.rb:11 + sig { override.void } + def execute; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/gem_verify.rb:6 +class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/gem_verify.rb:11 + sig { override.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/gem_verify.rb:18 + sig { void } + def perform_sync_verification; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/require.rb:6 +class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker + # pkg:gem/tapioca#lib/tapioca/commands/require.rb:8 + sig { params(requires_path: ::String, sorbet_config_path: ::String).void } + def initialize(requires_path:, sorbet_config_path:); end + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/require.rb:19 + sig { override.void } + def execute; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/todo.rb:6 +class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + + # pkg:gem/tapioca#lib/tapioca/commands/todo.rb:21 + sig { params(todo_file: ::String, file_header: T::Boolean).void } + def initialize(todo_file:, file_header:); end + + # pkg:gem/tapioca#lib/tapioca/commands/todo.rb:29 + sig { void } + def run_with_deprecation; end + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/commands/todo.rb:40 + sig { override.void } + def execute; end + + # pkg:gem/tapioca#lib/tapioca/commands/todo.rb:64 + sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } + def rbi(constants, command:); end + + # pkg:gem/tapioca#lib/tapioca/commands/todo.rb:84 + sig { returns(T::Array[::String]) } + def unresolved_constants; end +end + +# pkg:gem/tapioca#lib/tapioca/commands/todo.rb:9 +Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:5 +module Tapioca::ConfigHelper + requires_ancestor { Thor } + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:17 + 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 + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:11 + sig { returns(::String) } + def command_name; end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:14 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def defaults; end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:33 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def options; end + + private + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:146 + sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } + def build_error(msg); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:171 + sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } + def build_error_message(config_file, errors); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:55 + sig do + params( + options: ::Thor::CoreExt::HashWithIndifferentAccess + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def config_options(options); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:45 + sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } + def filter_defaults(options); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:186 + sig do + params( + options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def merge_options(*options); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:69 + sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } + def validate_config!(config_file, config); end + + # pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:95 + 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 + +# pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:141 +class Tapioca::ConfigHelper::ConfigError < ::T::Struct + const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] +end + +# pkg:gem/tapioca#lib/tapioca/helpers/config_helper.rb:136 +class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct + const :message, ::String + const :colors, T::Array[::Symbol] +end + +# pkg:gem/tapioca#lib/tapioca.rb:25 +Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:21 +Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:34 +Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:22 +Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:27 +Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/tapioca#lib/tapioca.rb:19 +Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:20 +Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:23 +Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) + +# pkg:gem/tapioca#lib/tapioca.rb:33 +Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/tapioca#lib/tapioca.rb:23 +Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:24 +Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/dsl/compilers.rb:5 +module Tapioca::Dsl; end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:6 +class Tapioca::Dsl::Compiler + extend T::Generic + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::Reflection + extend ::Tapioca::Runtime::Reflection + + abstract! + + ConstantType = type_member { { upper: T::Module[T.anything] } } + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:89 + sig do + params( + pipeline: ::Tapioca::Dsl::Pipeline, + root: ::RBI::Tree, + constant: ConstantType, + options: T::Hash[::String, T.untyped] + ).void + end + def initialize(pipeline, root, constant, options = T.unsafe(nil)); end + + # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. + # + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:108 + sig { params(error: ::String).void } + def add_error(error); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:98 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:20 + sig { returns(ConstantType) } + def constant; end + + # @abstract + # + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:104 + sig { abstract.void } + def decorate; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:26 + sig { returns(T::Hash[::String, T.untyped]) } + def options; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:23 + sig { returns(::RBI::Tree) } + def root; end + + private + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:157 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } + def compile_method_parameters_to_rbi(method_def); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:193 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } + def compile_method_return_type_to_rbi(method_def); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:144 + 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 + # + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:116 + 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 + # + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:38 + sig { abstract.returns(T::Enumerable[T::Module[T.anything]]) } + def gather_constants; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:32 + sig { params(constant: T::Module[T.anything]).returns(T::Boolean) } + def handles?(constant); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:41 + sig { returns(T::Set[T::Module[T.anything]]) } + def processable_constants; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:46 + sig { params(constants: T::Array[T::Module[T.anything]]).void } + def requested_constants=(constants); end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:51 + sig { void } + def reset_state; end + + private + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:74 + sig { returns(T::Enumerable[T::Class[T.anything]]) } + def all_classes; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:79 + sig { returns(T::Enumerable[T::Module[T.anything]]) } + def all_modules; end + + # pkg:gem/tapioca#lib/tapioca/dsl/compiler.rb:60 + 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 + end +end + +# pkg:gem/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. +# +# pkg:gem/tapioca#lib/tapioca/dsl/compilers.rb:13 +Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:6 +class Tapioca::Dsl::Pipeline + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:26 + sig do + params( + requested_constants: T::Array[T::Module[T.anything]], + requested_paths: T::Array[::Pathname], + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + error_handler: T.proc.params(error: ::String).void, + skipped_constants: T::Array[T::Module[T.anything]], + number_of_workers: T.nilable(::Integer), + compiler_options: T::Hash[::String, T.untyped], + lsp_addon: T::Boolean + ).void + end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:8 + sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } + def active_compilers; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:90 + sig { params(error: ::String).void } + def add_error(error); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:95 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:104 + sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def compilers; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:20 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:23 + sig { returns(T::Array[::String]) } + def errors; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:11 + sig { returns(T::Array[T::Module[T.anything]]) } + def requested_constants; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:14 + sig { returns(T::Array[::Pathname]) } + def requested_paths; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:50 + sig do + type_parameters(:R) + .params( + blk: T.proc.params(constant: T::Module[T.anything], rbi: ::RBI::File).returns(T.type_parameter(:R)) + ).returns(T::Array[T.type_parameter(:R)]) + end + def run(&blk); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:17 + sig { returns(T::Array[T::Module[T.anything]]) } + def skipped_constants; end + + private + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:197 + sig { void } + def abort_if_pending_migrations!; end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:143 + sig { params(constants: T::Set[T::Module[T.anything]]).returns(T::Set[T::Module[T.anything]]) } + def filter_anonymous_and_reloaded_constants(constants); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:113 + 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 + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:121 + sig do + params( + requested_constants: T::Array[T::Module[T.anything]], + requested_paths: T::Array[::Pathname], + skipped_constants: T::Array[T::Module[T.anything]] + ).returns(T::Set[T::Module[T.anything]]) + end + def gather_constants(requested_constants, requested_paths, skipped_constants); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:172 + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::RBI::File)) } + def rbi_for_constant(constant); end + + # pkg:gem/tapioca#lib/tapioca/dsl/pipeline.rb:191 + sig { params(error: ::String).void } + def report_error(error); end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/env_helper.rb:5 +module Tapioca::EnvHelper + requires_ancestor { Thor } + + # pkg:gem/tapioca#lib/tapioca/helpers/env_helper.rb:11 + sig { params(options: T::Hash[::Symbol, T.untyped]).void } + def set_environment(options); end +end + +class Tapioca::Error < ::StandardError; end + +# pkg:gem/tapioca#lib/tapioca/executor.rb:5 +class Tapioca::Executor + # pkg:gem/tapioca#lib/tapioca/executor.rb:9 + sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } + def initialize(queue, number_of_workers: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/executor.rb:20 + 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 + + # pkg:gem/tapioca#lib/tapioca/executor.rb:29 + sig { returns(::Integer) } + def max_processors; end +end + +# pkg:gem/tapioca#lib/tapioca/executor.rb:6 +Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:5 +module Tapioca::Gem; end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:72 +class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:77 + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Const).void } + def initialize(symbol, constant, node); end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:74 + sig { returns(::RBI::Const) } + def node; end +end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:23 +class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:33 + def initialize(symbol, constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:29 + def constant; end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:25 + sig { returns(::String) } + def symbol; end +end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:6 +class Tapioca::Gem::Event + abstract! +end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:40 +class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:48 + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } + def initialize(symbol, constant); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:43 + sig { override.returns(T::Module[T.anything]) } + def constant; end +end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:94 +class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:6 +module Tapioca::Gem::Listeners; end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:7 +class Tapioca::Gem::Listeners::Base + abstract! + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:13 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:18 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def dispatch(event); end + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:48 + sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:36 + sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:44 + sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/base.rb:40 + sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:7 +class Tapioca::Gem::Listeners::Documentation < ::Tapioca::Gem::Listeners::Base + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:21 + sig { params(pipeline: ::Tapioca::Gem::Pipeline, gem_graph: ::Rubydex::Graph).void } + def initialize(pipeline, gem_graph); end + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:58 + sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def documentation_comments(name, sigs: T.unsafe(nil)); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:88 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:36 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:48 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:42 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:30 + sig { params(line: ::String).returns(T::Boolean) } + def rbs_comment?(line); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/documentation.rb:8 +Tapioca::Gem::Listeners::Documentation::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/dynamic_mixins.rb:7 +class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/dynamic_mixins.rb:31 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/dynamic_mixins.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/foreign_constants.rb:7 +class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/foreign_constants.rb:56 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/foreign_constants.rb:50 + sig { params(location: ::String).returns(T::Boolean) } + def mixed_in_by_gem?(location); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/foreign_constants.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/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::Reflection + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:26 + sig do + params( + tree: ::RBI::Tree, + module_name: ::String, + mod: T::Module[T.anything], + for_visibility: T::Array[::Symbol], + attached_class: T.nilable(T::Module[T.anything]) + ).void + end + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:54 + sig do + params( + tree: ::RBI::Tree, + symbol_name: ::String, + constant: T::Module[T.anything], + method: T.nilable(::UnboundMethod), + visibility: ::RBI::Visibility + ).void + end + def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:210 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:202 + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::UnboundMethod)) } + def initialize_method_for(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:175 + sig { params(mod: T::Module[T.anything]).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } + def method_names_by_visibility(mod); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:194 + sig do + params( + attached_class: T.nilable(T::Module[T.anything]), + method_name: ::Symbol + ).returns(T.nilable(T::Boolean)) + end + 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. + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:161 + sig { params(method: ::UnboundMethod, constant: T::Module[T.anything]).returns(T::Boolean) } + def method_owned_by_constant?(method, constant); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/methods.rb:184 + sig { params(constant: T::Module[T.anything], method_name: ::String).returns(T::Boolean) } + def struct_method?(constant, method_name); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:7 +class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:34 + sig do + params( + tree: ::RBI::Tree, + constant: T::Module[T.anything], + mods: T::Array[T::Module[T.anything]], + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).void + end + def add_mixins(tree, constant, mods, mixin_type); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:70 + sig { params(mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(mixin_name); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:77 + sig { params(constant: T::Module[T.anything]).returns(T::Array[T::Module[T.anything]]) } + def interesting_ancestors_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:61 + sig do + params( + constant: T::Module[T.anything], + mixin: T::Module[T.anything], + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).returns(T::Boolean) + end + def mixed_in_by_gem?(constant, mixin, mixin_type); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/mixins.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb:7 +class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # @override + # + # pkg:gem/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 + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_enums.rb:7 +class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_enums.rb:28 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_enums.rb:12 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_helpers.rb:7 +class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_helpers.rb:27 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_helpers.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_props.rb:7 +class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_props.rb:34 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_props.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_required_ancestors.rb:7 +class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_required_ancestors.rb:23 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_required_ancestors.rb:12 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_signatures.rb:7 +class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_signatures.rb:23 + sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } + def compile_signature(signature, parameters); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_signatures.rb:77 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_signatures.rb:15 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_signatures.rb:65 + sig { params(signature: T.untyped).returns(T::Boolean) } + def signature_final?(signature); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_type_variables.rb:7 +class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_type_variables.rb:26 + sig { params(tree: ::RBI::Tree, constant: T::Module[T.anything]).void } + def compile_type_variable_declarations(tree, constant); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_type_variables.rb:63 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_type_variables.rb:49 + sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } + def node_from_type_variable(type_variable); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/sorbet_type_variables.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/source_location.rb:7 +class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base + private + + # pkg:gem/tapioca#lib/tapioca/gem/listeners/source_location.rb:46 + sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } + def add_source_location_comment(node, file, line); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/source_location.rb:12 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/source_location.rb:36 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/source_location.rb:19 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/listeners/subconstants.rb:7 +class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::Reflection + + private + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/subconstants.rb:35 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/gem/listeners/subconstants.rb:14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:96 +class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:110 + sig do + params( + symbol: ::String, + constant: T::Module[T.anything], + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def initialize(symbol, constant, method, node, signature, parameters); end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:98 + sig { returns(::UnboundMethod) } + def method; end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:101 + sig { returns(::RBI::Method) } + def node; end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:107 + sig { returns(T::Array[[::Symbol, ::String]]) } + def parameters; end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:104 + sig { returns(T.untyped) } + def signature; end +end + +# @abstract +# +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:53 +class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event + abstract! + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:65 + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } + def initialize(symbol, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:62 + sig { returns(T::Module[T.anything]) } + def constant; end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:59 + sig { returns(::String) } + def symbol; end +end + +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:6 +class Tapioca::Gem::Pipeline + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:19 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + error_handler: T.proc.params(error: ::String).void, + include_doc: T::Boolean, + include_loc: T::Boolean + ).void + end + def initialize(gem, error_handler:, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:57 + sig { returns(::RBI::Tree) } + def compile; end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:111 + sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } + def constant_in_gem?(name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:16 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:13 + sig { returns(::Tapioca::Gemfile::GemSpec) } + def gem; end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:147 + sig do + params( + method_name: ::Symbol, + owner: T::Module[T.anything] + ).returns(::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult) + end + def method_definition_in_gem(method_name, owner); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:173 + sig { params(constant: T::Module[T.anything]).returns(T.nilable(::String)) } + def name_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:81 + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Const).void } + def push_const(symbol, constant, node); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:71 + def push_constant(symbol, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:76 + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } + def push_foreign_constant(symbol, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:91 + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } + def push_foreign_scope(symbol, constant, node); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:96 + sig do + params( + symbol: ::String, + constant: T::Module[T.anything], + 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 + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:86 + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } + def push_scope(symbol, constant, node); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:65 + sig { params(symbol: ::String).void } + def push_symbol(symbol); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:103 + sig { params(symbol_name: ::String).returns(T::Boolean) } + def symbol_in_payload?(symbol_name); end + + private + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:470 + sig { params(name: ::String).void } + def add_to_alias_namespace(name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:475 + sig { params(name: ::String).returns(T::Boolean) } + def alias_namespaced?(name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:271 + sig { params(name: ::String, constant: T::Module[T.anything]).void } + def compile_alias(name, constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:257 + def compile_constant(symbol, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:245 + sig { params(symbol: ::String, constant: T::Module[T.anything]).void } + def compile_foreign_constant(symbol, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:326 + sig { params(name: ::String, constant: T::Module[T.anything]).void } + def compile_module(name, constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:293 + def compile_object(name, value); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:337 + sig { params(name: ::String, constant: T::Module[T.anything]).returns(::RBI::Scope) } + def compile_scope(name, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:351 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } + def compile_superclass(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:451 + sig { params(constant: T::Module[T.anything], strict: T::Boolean).returns(T::Boolean) } + def defined_in_gem?(constant, strict: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:203 + sig { params(event: ::Tapioca::Gem::Event).void } + def dispatch(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:494 + sig { params(constant: T.all(::T::Generic, T::Module[T.anything])).returns(::String) } + def generic_name_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:463 + sig { params(constant: T::Module[T.anything]).returns(T::Set[::String]) } + def get_file_candidates(constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:188 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def load_bootstrap_symbols(gem); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:510 + sig { params(constant: T::Module[T.anything], class_name: T.nilable(::String)).returns(T.nilable(::String)) } + def name_of_proxy_target(constant, class_name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:198 + sig { returns(::Tapioca::Gem::Event) } + def next_event; end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:226 + sig { params(event: ::Tapioca::Gem::ConstantFound).void } + def on_constant(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:238 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def on_node(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:217 + sig { params(event: ::Tapioca::Gem::SymbolFound).void } + def on_symbol(event); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:482 + sig { params(name: ::String).void } + def seen!(name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:487 + sig { params(name: ::String).returns(T::Boolean) } + def seen?(name); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:420 + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } + def skip_alias?(name, constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:408 + def skip_constant?(name, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:438 + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } + def skip_foreign_constant?(name, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:443 + sig { params(name: ::String, constant: T::Module[T.anything]).returns(T::Boolean) } + def skip_module?(name, constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:430 + def skip_object?(name, constant); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:402 + sig { params(name: ::String).returns(T::Boolean) } + def skip_symbol?(name); end +end + +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:10 +Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:120 +class Tapioca::Gem::Pipeline::MethodDefinitionLookupResult + abstract! +end + +# The method defined in gem and has a source location +# +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:135 +class Tapioca::Gem::Pipeline::MethodInGemWithLocation < ::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:140 + sig { params(location: ::Tapioca::Runtime::SourceLocation).void } + def initialize(location); end + + # pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:137 + sig { returns(::Tapioca::Runtime::SourceLocation) } + def location; end +end + +# The method probably defined in the gem but doesn't have a source location +# +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:132 +class Tapioca::Gem::Pipeline::MethodInGemWithoutLocation < ::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult; end + +# The method is not defined in the gem +# +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:129 +class Tapioca::Gem::Pipeline::MethodNotInGem < ::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult; end + +# The method doesn't seem to exist +# +# pkg:gem/tapioca#lib/tapioca/gem/pipeline.rb:126 +class Tapioca::Gem::Pipeline::MethodUnknown < ::Tapioca::Gem::Pipeline::MethodDefinitionLookupResult; end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:83 +class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:88 + sig { params(symbol: ::String, constant: T::Module[T.anything], node: ::RBI::Scope).void } + def initialize(symbol, constant, node); end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:85 + sig { returns(::RBI::Scope) } + def node; end +end + +# pkg:gem/tapioca#lib/tapioca/gem/events.rb:12 +class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:17 + sig { params(symbol: ::String).void } + def initialize(symbol); end + + # pkg:gem/tapioca#lib/tapioca/gem/events.rb:14 + sig { returns(::String) } + def symbol; end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:5 +module Tapioca::GemHelper + # pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:7 + 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 + + # pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:15 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_bundle_path?(full_gem_path); end + + # pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:20 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_ruby_path?(full_gem_path); end + + # pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:25 + sig { params(path: T.any(::Pathname, ::String)).returns(::String) } + def to_realpath(path); end + + private + + # pkg:gem/tapioca#lib/tapioca/helpers/gem_helper.rb:34 + sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } + def path_in_dir?(path, dir); end +end + +# pkg:gem/tapioca#lib/tapioca/gem_info.rb:5 +class Tapioca::GemInfo < ::T::Struct + const :name, ::String + const :version, ::Gem::Version + + class << self + # pkg:gem/tapioca#lib/tapioca/gem_info.rb:13 + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).returns(::Tapioca::GemInfo) } + def from_spec(spec); end + end +end + +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:7 +class Tapioca::Gemfile + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:27 + sig { params(excluded_gems: T::Array[::String]).void } + def initialize(excluded_gems); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:18 + sig { returns(::Bundler::Definition) } + def definition; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:21 + sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def dependencies; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:40 + sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } + def gem(gem_name); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:24 + sig { returns(T::Array[::String]) } + def missing_specs; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:45 + sig { void } + def require_bundle; end + + private + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:101 + sig { returns(::String) } + def dir; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:54 + sig { returns(::File) } + def gemfile; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:96 + sig { returns(T::Array[::Symbol]) } + def groups; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:57 + sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } + def load_dependencies; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:54 + def lockfile; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:68 + sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } + def materialize_deps; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:91 + sig { returns(::Bundler::Runtime) } + def runtime; end +end + +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:105 +class Tapioca::Gemfile::GemSpec + include ::Tapioca::GemHelper + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:137 + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } + def initialize(spec); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:147 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:172 + sig { params(path: ::String).returns(T::Boolean) } + def contains_path?(path); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:162 + sig { returns(T::Array[::Gem::Dependency]) } + def dependencies; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:186 + sig { returns(T::Boolean) } + def export_rbi_files?; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:181 + sig { returns(T::Array[::String]) } + def exported_rbi_files; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:191 + sig { returns(::RBI::MergeTree) } + def exported_rbi_tree; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:134 + sig { returns(T::Array[::Pathname]) } + def files; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:131 + sig { returns(::String) } + def full_gem_path; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:152 + sig { params(gemfile_dir: ::String).returns(T::Boolean) } + def ignore?(gemfile_dir); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:157 + sig { returns(::String) } + def name; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:167 + sig { returns(::String) } + def rbi_file_name; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:203 + sig { params(file: ::Pathname).returns(::Pathname) } + def relative_path_for(file); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:131 + def version; end + + private + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:214 + sig { returns(T::Array[::Pathname]) } + def collect_files; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:229 + sig { returns(T.nilable(T::Boolean)) } + def default_gem?; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:285 + sig { returns(T::Boolean) } + def gem_ignored?; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:264 + sig { params(path: ::String).returns(T::Boolean) } + def has_parent_gemspec?(path); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:234 + sig { returns(::Regexp) } + def require_paths_prefix_matcher; end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:243 + sig { params(file: ::String).returns(::Pathname) } + def resolve_to_ruby_lib_dir(file); end + + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:257 + sig { returns(::String) } + def version_string; end + + class << self + # pkg:gem/tapioca#lib/tapioca/gemfile.rb:111 + sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } + def spec_lookup_by_file_path; end + end +end + +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:120 +Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca/gemfile.rb:10 +Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } + +# pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:47 +module Tapioca::Helpers; end + +# pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:48 +class Tapioca::Helpers::PackageURL + # Constructs a package URL from its components + # @param type [String] The package type or protocol. + # @param namespace [String] A name prefix, specific to the type of package. + # @param name [String] The name of the package. + # @param version [String] The version of the package. + # @param qualifiers [Hash] Extra qualifying data for a package, specific to the type of package. + # @param subpath [String] An extra subpath within a package, relative to the package root. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:85 + def initialize(type:, name:, namespace: T.unsafe(nil), version: T.unsafe(nil), qualifiers: T.unsafe(nil), subpath: T.unsafe(nil)); end + + # Returns an array containing the + # scheme, type, namespace, name, version, qualifiers, and subpath components + # of the package URL. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:404 + def deconstruct; end + + # Returns a hash containing the + # scheme, type, namespace, name, version, qualifiers, and subpath components + # of the package URL. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:411 + def deconstruct_keys(_keys); end + + # The name of the package. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:66 + def name; end + + # A name prefix, specific to the type of package. + # For example, an npm scope, a Docker image owner, or a GitHub user. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:63 + def namespace; end + + # Extra qualifying data for a package, specific to the type of package. + # For example, the operating system or architecture. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:73 + def qualifiers; end + + # The URL scheme, which has a constant value of `"pkg"`. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:54 + def scheme; end + + # An extra subpath within a package, relative to the package root. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:76 + def subpath; end + + # Returns a hash containing the + # scheme, type, namespace, name, version, qualifiers, and subpath components + # of the package URL. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:259 + def to_h; end + + # Returns a string representation of the package URL. + # Package URL representations are created according to the instructions from + # https://github.com/package-url/purl-spec/blob/0b1559f76b79829e789c4f20e6d832c7314762c5/PURL-SPECIFICATION.rst#how-to-build-purl-string-from-its-components. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:274 + def to_s; end + + # The package type or protocol, such as `"gem"`, `"npm"`, and `"github"`. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:59 + def type; end + + # The version of the package. + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:69 + def version; end + + class << self + # Creates a new PackageURL from a string. + # @param [String] string The package URL string. + # @raise [InvalidPackageURL] If the string is not a valid package URL. + # @return [PackageURL] + # + # pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:101 + def parse(string); end + end +end + +# Raised when attempting to parse an invalid package URL string. +# @see #parse +# +# pkg:gem/tapioca#lib/tapioca/helpers/package_url.rb:51 +class Tapioca::Helpers::PackageURL::InvalidPackageURL < ::ArgumentError; end + +# pkg:gem/tapioca#lib/tapioca.rb:12 +Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:5 +module Tapioca::Loaders; end + +# pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:6 +class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:62 + 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 + + # @override + # + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:26 + sig { override.void } + def load; end + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:33 + sig { void } + def load_dsl_extensions_and_compilers; end + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:39 + sig { void } + def reload_custom_compilers; end + + protected + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:108 + sig { void } + def load_application; end + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:88 + sig { void } + def load_dsl_compilers; end + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:73 + sig { void } + def load_dsl_extensions; end + + private + + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:124 + sig { void } + def load_custom_dsl_compilers; end + + class << self + # pkg:gem/tapioca#lib/tapioca/loaders/dsl.rb:9 + 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 + +# pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:6 +class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:30 + 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 + + # @override + # + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:23 + sig { override.void } + def load; end + + protected + + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:68 + sig { params(file: ::String, error: ::LoadError).void } + def explain_failed_require(file, error); end + + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:41 + sig { void } + def require_gem_file; end + + class << self + # pkg:gem/tapioca#lib/tapioca/loaders/gem.rb:9 + 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 +# +# pkg:gem/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 + # + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:17 + sig { abstract.void } + def load; end + + private + + # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality. + # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some + # engine paths. The following commit is the change: + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:218 + def eager_load_paths(engine); end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:182 + sig { void } + def eager_load_rails_app; end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:161 + def engines; end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:22 + 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 + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:118 + sig { void } + def load_engines_in_classic_mode; end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:100 + sig { void } + def load_engines_in_zeitwerk_mode; end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:35 + 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 + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:75 + sig { void } + def load_rails_engines; end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:203 + sig { params(file: T.nilable(::String)).void } + def require_helper(file); end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:89 + def run_initializers; end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:175 + sig { params(path: ::String).void } + def safe_require(path); end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:143 + sig { params(blk: T.proc.void).void } + def with_rails_application(&blk); end + + # pkg:gem/tapioca#lib/tapioca/loaders/loader.rb:136 + sig { returns(T::Boolean) } + def zeitwerk_mode?; end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:5 +module Tapioca::RBIFilesHelper + requires_ancestor { Tapioca::SorbetHelper } + requires_ancestor { Thor::Shell } + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:42 + 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 + + # pkg:gem/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 + + # pkg:gem/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 + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:59 + sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } + def location_to_payload_url(loc, path_prefix:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:71 + 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 + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:249 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } + def extract_methods_and_attrs(nodes); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:242 + 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 + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:286 + sig { params(path: ::String).returns(::String) } + def gem_name_from_rbi_path(path); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:210 + sig { params(nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_methods_and_attrs?(nodes, shims_or_todos); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:202 + sig { params(shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_mixins?(shims_or_todos); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:174 + sig { params(all_nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_scopes?(all_nodes, shims_or_todos); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:140 + 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 + + # Do the list of `nodes` sharing the same name have duplicates? + # + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:157 + 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 + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_files_helper.rb:259 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } + def update_gem_rbis_strictnesses(errors, gem_dir); end +end + +# pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:5 +class Tapioca::RBIFormatter < ::RBI::Formatter + # pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:16 + sig { params(file: ::RBI::File).void } + def write_empty_body_comment!(file); end + + # pkg:gem/tapioca#lib/tapioca/rbi_formatter.rb:7 + sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } + def write_header!(file, command, reason: T.unsafe(nil)); end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:5 +module Tapioca::RBIHelper + include ::Tapioca::SorbetHelper + extend ::Tapioca::SorbetHelper + extend ::Tapioca::RBIHelper + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:80 + sig { params(type: ::String).returns(::String) } + def as_nilable_type(type); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:89 + sig { params(type: ::String).returns(::String) } + def as_non_nilable_type(type); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:61 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_block_param(name, type:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:51 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_kw_opt_param(name, type:, default:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:46 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_param(name, type:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:56 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_rest_param(name, type:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:36 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_opt_param(name, type:, default:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:31 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_param(name, type:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:41 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_rest_param(name, type:); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:66 + sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } + def create_typed_param(param, type); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:100 + sig { params(type_strings: T::Array[::String]).returns(T::Array[::String]) } + def extract_type_parameters(type_strings); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:71 + sig { params(sig_string: ::String).returns(::String) } + def sanitize_signature_types(sig_string); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:105 + sig { params(name: ::String).returns(T::Boolean) } + def valid_method_name?(name); end + + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:110 + sig { params(name: ::String).returns(T::Boolean) } + def valid_parameter_name?(name); end + + class << self + # pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:12 + 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 + +# pkg:gem/tapioca#lib/tapioca/helpers/rbi_helper.rb:97 +Tapioca::RBIHelper::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/tapioca#lib/tapioca/repo_index.rb:5 +class Tapioca::RepoIndex + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:21 + sig { void } + def initialize; end + + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:26 + sig { params(gem_name: ::String).void } + def <<(gem_name); end + + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:31 + sig { returns(T::Enumerable[::String]) } + def gems; end + + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:36 + sig { params(gem_name: ::String).returns(T::Boolean) } + def has_gem?(gem_name); end + + class << self + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:13 + sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(::Tapioca::RepoIndex) } + def from_hash(hash); end + + # pkg:gem/tapioca#lib/tapioca/repo_index.rb:8 + sig { params(json: ::String).returns(::Tapioca::RepoIndex) } + def from_json(json); end + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:5 +module Tapioca::Runtime + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/helpers.rb:11 + def silence_warnings(&blk); end + + # pkg:gem/tapioca#lib/tapioca/runtime/helpers.rb:22 + def with_disabled_exits(&block); end + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:6 +class Tapioca::Runtime::DynamicMixinCompiler + include ::Tapioca::Runtime::Reflection + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:19 + def initialize(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:13 + def class_attribute_predicates; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:13 + def class_attribute_readers; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:13 + def class_attribute_writers; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:134 + def compile_class_attributes(tree); end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:177 + def compile_mixes_in_class_methods(tree); end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:10 + def dynamic_extends; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:10 + def dynamic_includes; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:129 + def empty_attributes?; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:219 + def filtered_mixin?(qualified_mixin_name); end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:16 + def instance_attribute_predicates; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:16 + def instance_attribute_readers; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:16 + def instance_attribute_writers; end + + # pkg:gem/tapioca#lib/tapioca/runtime/dynamic_mixin_compiler.rb:212 + 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. +# +# pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:23 +module Tapioca::Runtime::GenericTypeRegistry + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:71 + def generic_type_instance?(instance); end + + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:76 + 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. + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:56 + 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. + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:90 + def register_type_variable(constant, type_variable); end + + private + + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:99 + def create_generic_type(constant, name); end + + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:141 + def create_safe_subclass(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:168 + def lookup_or_initialize_type_variables(constant); end + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:28 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:30 + def initialize(raw_type, underlying_type); end + + # @override + # + # pkg:gem/tapioca#lib/tapioca/runtime/generic_type_registry.rb:38 + def valid?(obj); end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/helpers.rb:6 +Tapioca::Runtime::NOOP_METHOD = T.let(T.unsafe(nil), Proc) + +module Tapioca::Runtime::Reflection + extend ::Tapioca::Runtime::Reflection + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:229 + def abstract_type_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:63 + def ancestors_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:84 + def are_equal?(object, other); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:73 + def attached_class_of(singleton_class); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:42 + def class_of(object); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:173 + def const_source_location(constant_name); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:29 + def constant_defined?(constant); end + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:35 + def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:47 + 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] + # + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:164 + def descendants_of(klass); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:215 + def file_candidates_for(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:235 + def final_module?(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:104 + def inherited_ancestors_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:146 + def method_of(constant, method); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:52 + def name_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:141 + def name_of_type(type); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:79 + def object_id_of(object); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:99 + def private_instance_methods_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:94 + def protected_instance_methods_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:89 + def public_instance_methods_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:113 + 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)>" or "block in <class:...>" in the + # case of an ActiveSupport.on_load hook. If none is found, it returns the location + # labeled "<main>", which is the original call site. + # + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:186 + def resolve_loc(locations); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:240 + def sealed_module?(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:134 + def signature_of(method); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:127 + def signature_of!(method); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:58 + def singleton_class_of(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:68 + def superclass_of(constant); end + + private + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:277 + def child_module_for_parent_with_name(parent, name); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:293 + def has_aliased_namespace?(name); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:288 + def method_defined_by_forwardable_module?(method); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:263 + def methods_for(constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:247 + def relevant_methods_for(constant); end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:15 +Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:11 +Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:12 +Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:18 +Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:22 +Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:13 +Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:17 +Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:21 +Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:20 +Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:19 +Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:25 +Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:14 +Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# pkg:gem/tapioca#lib/tapioca/runtime/reflection.rb:16 +Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +class Tapioca::Runtime::Reflection::SignatureBlockError < ::Tapioca::Error; end + +class Tapioca::Runtime::SourceLocation + # pkg:gem/tapioca#lib/tapioca/runtime/source_location.rb:18 + def initialize(file:, line:); end + + # pkg:gem/tapioca#lib/tapioca/runtime/source_location.rb:13 + def file; end + + # pkg:gem/tapioca#lib/tapioca/runtime/source_location.rb:16 + def line; end + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/source_location.rb:38 + def from_loc(loc); end + + private + + def new(*_arg0); end + end +end + +# this looks something like: +# "(eval at /path/to/file.rb:123)" +# and we are interested in the "/path/to/file.rb" and "123" parts +# +# pkg:gem/tapioca#lib/tapioca/runtime/source_location.rb:10 +Tapioca::Runtime::SourceLocation::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:6 +module Tapioca::Runtime::Trackers + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers.rb:26 + def disable_all!; end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers.rb:31 + def register_tracker(tracker); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers.rb:13 + def with_trackers_enabled(&blk); end + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:7 +module Tapioca::Runtime::Trackers::Autoload + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:14 + def eager_load_all!; end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/autoload.rb:26 + def register(constant_name); end + end +end + +# 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::Reflection + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:58 + def build_source_location(tp, locations); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:52 + 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. + # + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:87 + def files_for(klass); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:92 + def locations_for(klass); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:67 + def register(constant, loc); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/constant_definition.rb:73 + def register_cname(cname, namespace, locations); end + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/method_definition.rb:7 +module Tapioca::Runtime::Trackers::MethodDefinition + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/method_definition.rb:28 + def method_definitions_for(method_name, owner); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/method_definition.rb:14 + def register(method_name, owner, locations); end + + private + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/method_definition.rb:42 + def registrations_for(method_name, owner); end + end +end + +module Tapioca::Runtime::Trackers::Mixin + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:50 + def constants_with_mixin(mixin); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:55 + def mixin_location(mixin, mixin_type, constant); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:28 + def register(constant, mixin, mixin_type); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:37 + def resolve_to_attached_class(constant, mixin, mixin_type); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:23 + def with_disabled_registration(&block); end + + private + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:70 + def find_or_initialize_mixin_lookup(mixin); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/mixin.rb:62 + def register_with_location(constant, mixin, mixin_type, location); end + end +end + +class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum + enums do + Extend = new + Include = new + Prepend = new + end +end + +# pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:7 +module Tapioca::Runtime::Trackers::RequiredAncestor + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:13 + def register(requiring, block); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:21 + def required_ancestors_blocks_by(mod); end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/required_ancestor.rb:26 + def required_ancestors_by(mod); end + end +end + +# @abstract +module Tapioca::Runtime::Trackers::Tracker + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/tracker.rb:20 + def disable!; end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/tracker.rb:24 + def enabled?; end + + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/tracker.rb:28 + def with_disabled_tracker(&block); end + + class << self + # pkg:gem/tapioca#lib/tapioca/runtime/trackers/tracker.rb:11 + def extended(base); end + end +end + +# pkg:gem/tapioca#lib/tapioca.rb:14 +Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:13 +Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:5 +module Tapioca::SorbetHelper + # pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:21 + sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } + def sorbet(*sorbet_args); end + + # pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:45 + sig { returns(::String) } + def sorbet_path; end + + # pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:52 + sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } + def sorbet_supports?(feature, version: T.unsafe(nil)); end + + # pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:26 + sig { params(source: ::String, rbi_mode: T::Boolean, on_failure: T.proc.params(stderr: ::String).void).void } + def sorbet_syntax_check!(source, rbi_mode:, &on_failure); end +end + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:16 +Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:8 +Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:10 +Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:6 +Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:12 +Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/helpers/sorbet_helper.rb:14 +Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) + +# pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:5 +module Tapioca::Static; end + +# pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:6 +class Tapioca::Static::RequiresCompiler + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:8 + sig { params(sorbet_path: ::String).void } + def initialize(sorbet_path); end + + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:13 + sig { returns(::String) } + def compile; end + + private + + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:27 + sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } + def collect_files(config); end + + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:42 + sig { params(file_path: ::String).returns(T::Enumerable[::String]) } + def collect_requires(file_path); end + + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:49 + sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } + def file_ignored_by_sorbet?(config, file_path); end + + # pkg:gem/tapioca#lib/tapioca/static/requires_compiler.rb:78 + sig { params(path: ::Pathname).returns(T::Array[::String]) } + def path_parts(path); end +end + +# pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:6 +module Tapioca::Static::SymbolLoader + extend ::Tapioca::SorbetHelper + extend ::Tapioca::Runtime::Reflection + + class << self + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:35 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def engine_symbols(gem); end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:30 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def gem_symbols(gem); end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:22 + sig { params(paths: T::Array[::Pathname]).returns(::Rubydex::Graph) } + def graph_from_paths(paths); end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:12 + sig { returns(T::Set[::String]) } + def payload_symbols; end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:60 + sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } + def symbols_from_paths(paths); end + + private + + # @without_runtime + # + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:79 + def engines; end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_loader.rb:89 + sig { params(input: ::String, table_type: ::String).returns(::String) } + def symbol_table_json_from(input, table_type: T.unsafe(nil)); end + end +end + +# pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:6 +class Tapioca::Static::SymbolTableParser + # pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:26 + sig { void } + def initialize; end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:61 + sig { params(name: ::String).returns(::String) } + def fully_qualified_name(name); end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:32 + sig { params(object: T::Hash[::String, T.untyped]).void } + def parse_object(object); end + + # pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:23 + sig { returns(T::Set[::String]) } + def symbols; end + + class << self + # pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:11 + sig { params(json_string: ::String).returns(T::Set[::String]) } + def parse_json(json_string); end + end +end + +# pkg:gem/tapioca#lib/tapioca/static/symbol_table_parser.rb:7 +Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) + +# pkg:gem/tapioca#lib/tapioca.rb:16 +Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca.rb:15 +Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:108 +class Tapioca::TypeVariable < ::T::Types::TypeVariable + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:109 + def initialize(name, variance); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:114 + def name; end +end + +# This is subclassing from `Module` so that instances of this type will be modules. +# The reason why we want that is because that means those instances will automatically +# get bound to the constant names they are assigned to by Ruby. As a result, we don't +# need to do any matching of constants to type variables to bind their names, Ruby will +# do that automatically for us and we get the `name` method for free from `Module`. +# +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:122 +class Tapioca::TypeVariableModule < ::Module + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:137 + def initialize(context, type, variance, bounds_proc); end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:173 + def coerce_to_type_variable; end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:153 + def fixed?; end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:147 + def name; end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:158 + def serialize; end + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:134 + def type; end + + private + + # pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:180 + def bounds; end +end + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:131 +Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) + +# pkg:gem/tapioca#lib/tapioca/sorbet_ext/generic_name_patch.rb:123 +class Tapioca::TypeVariableModule::Type < ::T::Enum + enums do + HasAttachedClass = new + Member = new + Template = new + end +end + +# pkg:gem/tapioca#lib/tapioca/version.rb:5 +Tapioca::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/tapioca@0.6.1.rbi b/sorbet/rbi/gems/tapioca@0.6.1.rbi deleted file mode 100644 index 658ca524..00000000 --- a/sorbet/rbi/gems/tapioca@0.6.1.rbi +++ /dev/null @@ -1,1197 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `tapioca` gem. -# Please instead update this file by running `bin/tapioca gem tapioca`. - -class ActiveRecordColumnTypeHelper - def initialize(*args, **_arg1_arg1, &blk); end - - sig { params(column_name: String).returns([String, String]) } - def type_for(column_name); end - - private - - sig { params(constant: Module).returns(T::Boolean) } - def do_not_generate_strong_types?(constant); end - - sig { params(column_type: Object).returns(String) } - def handle_unknown_type(column_type); end - - def lookup_arg_type_of_method(*args, **_arg1_arg1, &blk); end - def lookup_return_type_of_method(*args, **_arg1_arg1, &blk); end -end - -class DynamicMixinCompiler - include ::Tapioca::Reflection - - sig { params(constant: Module).void } - def initialize(constant); end - - def class_attribute_predicates; end - - sig { returns(T::Array[Symbol]) } - def class_attribute_readers; end - - def class_attribute_writers; end - - sig { params(tree: RBI::Tree).void } - def compile_class_attributes(tree); end - - sig { params(tree: RBI::Tree).returns([T::Array[Module], T::Array[Module]]) } - def compile_mixes_in_class_methods(tree); end - - sig { returns(T::Array[Module]) } - def dynamic_extends; end - - def dynamic_includes; end - - sig { returns(T::Boolean) } - def empty_attributes?; end - - def instance_attribute_predicates; end - - sig { returns(T::Array[Symbol]) } - def instance_attribute_readers; end - - def instance_attribute_writers; end -end - -class Module - def autoload(const_name, path); end -end - -module RBI; end - -class RBI::File - sig { params(strictness: T.nilable(String), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(file: RBI::File).void)).void } - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(node: RBI::Node).void } - def <<(node); end - - sig { params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { returns(T::Array[RBI::Comment]) } - def comments; end - - def comments=(_arg0); end - - sig { returns(T::Boolean) } - def empty?; end - - sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void } - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { returns(RBI::Tree) } - def root; end - - def root=(_arg0); end - - sig { void } - def set_empty_body_content; end - - sig { params(command: String, reason: T.nilable(String), display_heading: T::Boolean).void } - def set_file_header(command, reason: T.unsafe(nil), display_heading: T.unsafe(nil)); end - - sig { returns(T.nilable(String)) } - def strictness; end - - def strictness=(_arg0); end - - sig { params(indent: Integer, print_locs: T::Boolean).returns(String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - sig { void } - def transform_rbi!; end - - sig { returns(String) } - def transformed_string; end -end - -class RBI::Tree < ::RBI::NodeWithComments - sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - sig { params(node: RBI::Node).void } - def <<(node); end - - sig { override.params(v: RBI::Printer).void } - def accept_printer(v); end - - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - 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 - - sig { params(name: String, superclass_name: T.nilable(String), block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) } - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - sig { params(name: String, value: String).void } - def create_constant(name, value:); end - - sig { params(name: String).void } - def create_extend(name); end - - sig { params(name: String).void } - def create_include(name); end - - sig { params(name: String, parameters: T::Array[RBI::TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility).void } - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end - - sig { params(name: String).void } - def create_mixes_in_class_methods(name); end - - sig { params(name: String, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) } - def create_module(name, &block); end - - sig { params(constant: Module, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).void } - def create_path(constant, &block); end - - sig { params(name: String, value: String).void } - def create_type_member(name, value: T.unsafe(nil)); end - - sig { params(annotation: String).void } - def deannotate!(annotation); end - - sig { returns(T::Boolean) } - def empty?; end - - sig { void } - def group_nodes!; end - - sig { returns(RBI::Index) } - def index; end - - sig { params(other: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) } - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - sig { void } - def nest_non_public_methods!; end - - sig { void } - def nest_singleton_methods!; end - - sig { returns(T::Array[RBI::Node]) } - def nodes; end - - sig { override.returns(T::Boolean) } - def oneline?; end - - sig { void } - def sort_nodes!; end - - private - - sig { params(node: RBI::Node).returns(RBI::Node) } - def create_node(node); end - - sig { returns(T::Hash[String, RBI::Node]) } - def nodes_cache; end - - sig { params(name: String).returns(T::Boolean) } - def valid_method_name?(name); end -end - -RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -class RBI::TypedParam < ::T::Struct - const :param, RBI::Param - const :type, String - - class << self - def inherited(s); end - end -end - -RBI::VERSION = T.let(T.unsafe(nil), String) - -module T::Generic::TypeStoragePatch - def [](*types); end - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end -end - -module T::Types::Simple::GenericNamePatch - def name; end -end - -module T::Types::Simple::NamePatch - def name; end -end - -module Tapioca - class << self - sig { type_parameters(:Result).params(blk: T.proc.returns(T.type_parameter(:Result))).returns(T.type_parameter(:Result)) } - def silence_warnings(&blk); end - end -end - -class Tapioca::Cli < ::Thor - include ::Tapioca::CliHelper - include ::Tapioca::ConfigHelper - - def __print_version; end - def clean_shims(*files_to_clean); end - def dsl(*constants); end - def gem(*gems); end - def init; end - def require; end - def todo; end - - class << self - def exit_on_failure?; end - end -end - -Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) - -module Tapioca::CliHelper - sig { params(message: String, color: T.any(Symbol, T::Array[Symbol])).void } - def say_error(message = T.unsafe(nil), *color); end -end - -module Tapioca::Compilers; end -module Tapioca::Compilers::Dsl; end - -class Tapioca::Compilers::Dsl::Base - include ::Tapioca::Reflection - include ::Tapioca::Compilers::Dsl::ParamHelper - - abstract! - - sig { params(compiler: Tapioca::Compilers::DslCompiler).void } - def initialize(compiler); end - - sig { params(error: String).void } - def add_error(error); end - - sig { abstract.type_parameters(:T).params(tree: RBI::Tree, constant: T.type_parameter(:T)).void } - def decorate(tree, constant); end - - sig { returns(T::Array[String]) } - def errors; end - - sig { abstract.returns(T::Enumerable[Module]) } - def gather_constants; end - - sig { params(generator_name: String).returns(T::Boolean) } - def generator_enabled?(generator_name); end - - sig { params(constant: Module).returns(T::Boolean) } - def handles?(constant); end - - sig { returns(T::Set[Module]) } - def processable_constants; end - - private - - sig { returns(T::Enumerable[Class]) } - def all_classes; end - - sig { returns(T::Enumerable[Module]) } - def all_modules; end - - sig { params(method_def: T.any(Method, UnboundMethod)).returns(T::Array[RBI::TypedParam]) } - def compile_method_parameters_to_rbi(method_def); end - - sig { params(method_def: T.any(Method, UnboundMethod)).returns(String) } - def compile_method_return_type_to_rbi(method_def); end - - 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 - - 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 - sig { params(name: String).returns(T.nilable(T.class_of(Tapioca::Compilers::Dsl::Base))) } - def resolve(name); end - end -end - -Tapioca::Compilers::Dsl::DSL_COMPILERS_DIR = T.let(T.unsafe(nil), String) - -module Tapioca::Compilers::Dsl::ParamHelper - sig { params(name: String, type: String).returns(RBI::TypedParam) } - def create_block_param(name, type:); end - - sig { params(name: String, type: String, default: String).returns(RBI::TypedParam) } - def create_kw_opt_param(name, type:, default:); end - - sig { params(name: String, type: String).returns(RBI::TypedParam) } - def create_kw_param(name, type:); end - - sig { params(name: String, type: String).returns(RBI::TypedParam) } - def create_kw_rest_param(name, type:); end - - sig { params(name: String, type: String, default: String).returns(RBI::TypedParam) } - def create_opt_param(name, type:, default:); end - - sig { params(name: String, type: String).returns(RBI::TypedParam) } - def create_param(name, type:); end - - sig { params(name: String, type: String).returns(RBI::TypedParam) } - def create_rest_param(name, type:); end - - sig { params(param: RBI::Param, type: String).returns(RBI::TypedParam) } - def create_typed_param(param, type); end -end - -class Tapioca::Compilers::DslCompiler - sig { params(requested_constants: T::Array[Module], requested_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], excluded_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], error_handler: T.proc.params(error: String).void, number_of_workers: T.nilable(Integer)).void } - def initialize(requested_constants:, requested_generators: T.unsafe(nil), excluded_generators: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end - - sig { returns(T.proc.params(error: String).void) } - def error_handler; end - - sig { params(generator_name: String).returns(T::Boolean) } - def generator_enabled?(generator_name); end - - sig { returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } - def generators; end - - sig { returns(T::Array[Module]) } - def requested_constants; end - - sig { 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)]) } - def run(&blk); end - - private - - sig { params(requested_constants: T::Array[Module]).returns(T::Set[Module]) } - def gather_constants(requested_constants); end - - sig { params(requested_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)], excluded_generators: T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)]).returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } - def gather_generators(requested_generators, excluded_generators); end - - sig { params(constant: Module).returns(T.nilable(RBI::File)) } - def rbi_for_constant(constant); end - - sig { params(error: String).returns(T.noreturn) } - def report_error(error); end -end - -class Tapioca::Compilers::RequiresCompiler - sig { params(sorbet_path: String).void } - def initialize(sorbet_path); end - - sig { returns(String) } - def compile; end - - private - - sig { params(config: Spoom::Sorbet::Config).returns(T::Array[String]) } - def collect_files(config); end - - sig { params(file_path: String).returns(T::Enumerable[String]) } - def collect_requires(file_path); end - - sig { params(config: Spoom::Sorbet::Config, file_path: Pathname).returns(T::Boolean) } - def file_ignored_by_sorbet?(config, file_path); end - - sig { params(files: T::Enumerable[String], name: String).returns(T::Boolean) } - def name_in_project?(files, name); end - - sig { params(path: Pathname).returns(T::Array[String]) } - def path_parts(path); end -end - -module Tapioca::Compilers::Sorbet - class << self - sig { params(args: String).returns(String) } - def run(*args); end - - sig { returns(String) } - def sorbet_path; end - - sig { params(feature: Symbol, version: T.nilable(Gem::Version)).returns(T::Boolean) } - def supports?(feature, version: T.unsafe(nil)); end - end -end - -Tapioca::Compilers::Sorbet::EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) -Tapioca::Compilers::Sorbet::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) -Tapioca::Compilers::Sorbet::SORBET = T.let(T.unsafe(nil), Pathname) -Tapioca::Compilers::Sorbet::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) -module Tapioca::Compilers::SymbolTable; end - -class Tapioca::Compilers::SymbolTable::SymbolGenerator - include ::Tapioca::Reflection - - sig { params(gem: Tapioca::Gemfile::GemSpec, indent: Integer, include_doc: T::Boolean).void } - def initialize(gem, indent = T.unsafe(nil), include_doc = T.unsafe(nil)); end - - sig { returns(Tapioca::Gemfile::GemSpec) } - def gem; end - - sig { params(rbi: RBI::File).void } - def generate(rbi); end - - sig { returns(Integer) } - def indent; end - - private - - sig { params(tree: RBI::Tree, mods: T::Array[Module], mixin_type: Tapioca::Trackers::Mixin::Type).void } - def add_mixins(tree, mods, mixin_type); end - - sig { params(name: String).void } - def add_to_alias_namespace(name); end - - sig { params(name: T.nilable(String)).void } - def add_to_symbol_queue(name); end - - sig { params(name: String).returns(T::Boolean) } - def alias_namespaced?(name); end - - sig { params(tree: RBI::Tree, name: T.nilable(String), constant: BasicObject).void } - def compile(tree, name, constant); end - - sig { params(tree: RBI::Tree, name: String, constant: Module).void } - def compile_alias(tree, name, constant); end - - sig { params(tree: RBI::Tree, name: String, constant: Module).void } - def compile_body(tree, name, constant); end - - sig { params(tree: RBI::Tree, name: String, constant: BasicObject).void } - def compile_constant(tree, name, constant); end - - sig { params(tree: RBI::Tree, module_name: String, mod: Module, for_visibility: T::Array[Symbol]).void } - def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_dynamic_mixins(tree, constant); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_enums(tree, constant); end - - sig { params(tree: RBI::Tree, symbol_name: String, constant: Module, method: T.nilable(UnboundMethod), visibility: RBI::Visibility).void } - def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end - - sig { params(tree: RBI::Tree, name: String, constant: Module).void } - def compile_methods(tree, name, constant); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_mixins(tree, constant); end - - sig { params(tree: RBI::Tree, name: String, constant: Module).void } - def compile_module(tree, name, constant); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_module_helpers(tree, constant); end - - sig { params(tree: RBI::Tree, name: String, value: BasicObject).void } - def compile_object(tree, name, value); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_props(tree, constant); end - - sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(RBI::Sig) } - def compile_signature(signature, parameters); end - - sig { params(tree: RBI::Tree, name: String, constant: Module).void } - def compile_subconstants(tree, name, constant); end - - sig { params(constant: Class).returns(T.nilable(String)) } - def compile_superclass(constant); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_type_variable_declarations(tree, constant); end - - sig { params(tree: RBI::Tree, constant: Module).void } - def compile_type_variables(tree, constant); end - - sig { params(constant: Module, strict: T::Boolean).returns(T::Boolean) } - def defined_in_gem?(constant, strict: T.unsafe(nil)); end - - sig { params(name: String).returns(T::Array[RBI::Comment]) } - def documentation_comments(name); end - - sig { params(symbols: T::Set[String]).returns(T::Set[String]) } - def engine_symbols(symbols); end - - sig { params(tree: RBI::Tree, symbol: String).void } - def generate_from_symbol(tree, symbol); end - - sig { params(constant: T.all(Module, T::Generic)).returns(String) } - def generic_name_of(constant); end - - sig { params(constant: Module).returns(T::Array[String]) } - def get_file_candidates(constant); end - - sig { params(constant: Module).returns(T.nilable(UnboundMethod)) } - def initialize_method_for(constant); end - - sig { params(constant: Module).returns(T::Array[Module]) } - def interesting_ancestors_of(constant); end - - sig { params(name: String).void } - def mark_seen(name); end - - sig { params(method: UnboundMethod).returns(T::Boolean) } - def method_in_gem?(method); end - - sig { params(mod: Module).returns(T::Hash[Symbol, T::Array[Symbol]]) } - def method_names_by_visibility(mod); end - - sig { params(mod: Module, mixin_type: Tapioca::Trackers::Mixin::Type, mixin_locations: T::Hash[Tapioca::Trackers::Mixin::Type, T::Hash[Module, T::Array[String]]]).returns(T::Boolean) } - def mixed_in_by_gem?(mod, mixin_type, mixin_locations); end - - sig { params(constant: Module).returns(T.nilable(String)) } - def name_of(constant); end - - sig { params(constant: Module, class_name: T.nilable(String)).returns(T.nilable(String)) } - def name_of_proxy_target(constant, class_name); end - - sig { params(sig_string: String).returns(String) } - def sanitize_signature_types(sig_string); end - - sig { params(name: String).returns(T::Boolean) } - def seen?(name); end - - sig { params(constant: Module, method_name: String).returns(T::Boolean) } - def struct_method?(constant, method_name); end - - sig { params(symbol_name: String).returns(T::Boolean) } - def symbol_ignored?(symbol_name); end - - sig { returns(T::Set[String]) } - def symbols; end - - sig { params(name: String).returns(T::Boolean) } - def valid_method_name?(name); end -end - -Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) -Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) -Tapioca::Compilers::SymbolTable::SymbolGenerator::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) -Tapioca::Compilers::SymbolTable::SymbolGenerator::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) - -module Tapioca::Compilers::SymbolTable::SymbolLoader - class << self - def ignore_symbol?(symbol); end - - sig { params(paths: T::Array[Pathname]).returns(T::Set[String]) } - def list_from_paths(paths); end - - private - - def ignored_symbols; end - - sig { params(paths: T::Array[String]).returns(T::Set[String]) } - def load_symbols(paths); end - - def symbol_table_json_from(input, table_type: T.unsafe(nil)); end - end -end - -class Tapioca::Compilers::SymbolTable::SymbolLoader::SymbolTableParser - class << self - def parse(object, parents = T.unsafe(nil)); end - end -end - -class Tapioca::Compilers::SymbolTableCompiler - sig { params(gem: Tapioca::Gemfile::GemSpec, rbi: RBI::File, indent: Integer, include_docs: T::Boolean).void } - def compile(gem, rbi, indent = T.unsafe(nil), include_docs = T.unsafe(nil)); end -end - -class Tapioca::Compilers::TodosCompiler - sig { returns(String) } - def compile; end - - private - - sig { returns(String) } - def list_todos; end -end - -module Tapioca::ConfigHelper - 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 - - sig { returns(String) } - def command_name; end - - sig { returns(Thor::CoreExt::HashWithIndifferentAccess) } - def defaults; end - - sig { returns(Thor::CoreExt::HashWithIndifferentAccess) } - def options; end - - private - - sig { params(options: Thor::CoreExt::HashWithIndifferentAccess).returns(Thor::CoreExt::HashWithIndifferentAccess) } - def config_options(options); end - - sig { params(options: T::Hash[Symbol, Thor::Option]).void } - def filter_defaults(options); end - - sig { params(options: T.nilable(Thor::CoreExt::HashWithIndifferentAccess)).returns(Thor::CoreExt::HashWithIndifferentAccess) } - def merge_options(*options); end -end - -Tapioca::DEFAULT_COMMAND = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) -class Tapioca::Error < ::StandardError; end - -class Tapioca::Executor - sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(Integer)).void } - def initialize(queue, number_of_workers: T.unsafe(nil)); end - - sig { type_parameters(:T).params(block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T))).returns(T::Array[T.type_parameter(:T)]) } - def run_in_parallel(&block); end -end - -Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) - -class Tapioca::Gemfile - sig { void } - def initialize; end - - sig { returns(Bundler::Definition) } - def definition; end - - sig { returns(T::Array[Tapioca::Gemfile::GemSpec]) } - def dependencies; end - - sig { params(gem_name: String).returns(T.nilable(Tapioca::Gemfile::GemSpec)) } - def gem(gem_name); end - - sig { returns(T::Array[String]) } - def missing_specs; end - - sig { void } - def require_bundle; end - - private - - sig { returns(String) } - def dir; end - - sig { returns(File) } - def gemfile; end - - sig { returns(T::Array[Symbol]) } - def groups; end - - sig { returns([T::Array[Tapioca::Gemfile::GemSpec], T::Array[String]]) } - def load_dependencies; end - - def lockfile; end - - sig { returns([T::Enumerable[T.any(Bundler::StubSpecification, Gem::Specification)], T::Array[String]]) } - def materialize_deps; end - - sig { returns(Bundler::Runtime) } - def runtime; end -end - -class Tapioca::Gemfile::GemSpec - sig { params(spec: T.any(Bundler::StubSpecification, Gem::Specification)).void } - def initialize(spec); end - - sig { params(path: String).returns(T::Boolean) } - def contains_path?(path); end - - sig { returns(T::Boolean) } - def export_rbi_files?; end - - sig { returns(T::Array[String]) } - def exported_rbi_files; end - - sig { returns(RBI::MergeTree) } - def exported_rbi_tree; end - - sig { returns(T::Array[Pathname]) } - def files; end - - sig { returns(String) } - def full_gem_path; end - - sig { params(gemfile_dir: String).returns(T::Boolean) } - def ignore?(gemfile_dir); end - - sig { returns(String) } - def name; end - - sig { void } - def parse_yard_docs; end - - sig { returns(String) } - def rbi_file_name; end - - def version; end - - private - - sig { returns(T::Boolean) } - def default_gem?; end - - sig { returns(T::Boolean) } - def gem_ignored?; end - - sig { params(gemfile_dir: String).returns(T::Boolean) } - def gem_in_app_dir?(gemfile_dir); end - - sig { returns(T::Boolean) } - def gem_in_bundle_path?; end - - sig { params(path: String).returns(T::Boolean) } - def has_parent_gemspec?(path); end - - sig { returns(Pathname) } - def ruby_lib_dir; end - - sig { params(path: T.any(Pathname, String)).returns(String) } - def to_realpath(path); end - - sig { returns(String) } - def version_string; end -end - -Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) -Tapioca::Gemfile::Spec = T.type_alias { T.any(Bundler::StubSpecification, Gem::Specification) } -module Tapioca::Generators; end - -class Tapioca::Generators::Base - include ::Tapioca::CliHelper - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - abstract! - - sig { params(default_command: String, file_writer: Thor::Actions).void } - def initialize(default_command:, file_writer: T.unsafe(nil)); end - - sig { abstract.void } - def generate; end - - private - - sig { params(path: T.any(Pathname, String), content: String, force: T::Boolean, skip: T::Boolean, verbose: T::Boolean).void } - def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end - - sig { params(path: T.any(Pathname, String), verbose: T::Boolean).void } - def remove_file(path, verbose: T.unsafe(nil)); end -end - -class Tapioca::Generators::Base::FileWriter < ::Thor - include ::Thor::Actions - extend ::Thor::Actions::ClassMethods -end - -class Tapioca::Generators::Dsl < ::Tapioca::Generators::Base - sig { params(requested_constants: T::Array[String], outpath: Pathname, only: T::Array[String], exclude: T::Array[String], file_header: T::Boolean, compiler_path: String, tapioca_path: String, default_command: String, file_writer: Thor::Actions, should_verify: T::Boolean, quiet: T::Boolean, verbose: T::Boolean, number_of_workers: T.nilable(Integer)).void } - def initialize(requested_constants:, outpath:, only:, exclude:, file_header:, compiler_path:, tapioca_path:, default_command:, file_writer: T.unsafe(nil), should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end - - sig { override.void } - def generate; end - - private - - sig { void } - def abort_if_pending_migrations!; end - - sig { params(cause: Symbol, files: T::Array[String]).returns(String) } - def build_error_for_files(cause, files); end - - sig { params(constant_name: String, rbi: RBI::File, outpath: Pathname, quiet: T::Boolean).returns(T.nilable(Pathname)) } - def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - - sig { params(constant_names: T::Array[String]).returns(T::Array[Module]) } - def constantize(constant_names); end - - sig { params(generator_names: T::Array[String]).returns(T::Array[T.class_of(Tapioca::Compilers::Dsl::Base)]) } - def constantize_generators(generator_names); end - - sig { params(constant_name: String).returns(Pathname) } - def dsl_rbi_filename(constant_name); end - - sig { params(requested_constants: T::Array[String], path: Pathname).returns(T::Set[Pathname]) } - def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - - sig { params(constant: String).returns(String) } - def generate_command_for(constant); end - - sig { params(eager_load: T::Boolean).void } - def load_application(eager_load:); end - - sig { void } - def load_dsl_extensions; end - - sig { void } - def load_dsl_generators; end - - sig { returns(Tapioca::Loader) } - def loader; end - - sig { params(dir: Pathname).void } - def perform_dsl_verification(dir); end - - sig { params(files: T::Set[Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - - sig { params(constant: String).returns(String) } - def rbi_filename_for(constant); end - - sig { params(path: Pathname).returns(T::Array[Pathname]) } - def rbi_files_in(path); end - - sig { params(diff: T::Hash[String, Symbol], command: String).void } - def report_diff_and_exit_if_out_of_date(diff, command); end - - sig { params(class_name: String).returns(String) } - def underscore(class_name); end - - sig { params(tmp_dir: Pathname).returns(T::Hash[String, Symbol]) } - def verify_dsl_rbi(tmp_dir:); end -end - -class Tapioca::Generators::Gem < ::Tapioca::Generators::Base - sig { params(gem_names: T::Array[String], exclude: T::Array[String], prerequire: T.nilable(String), postrequire: String, typed_overrides: T::Hash[String, String], default_command: String, outpath: Pathname, file_header: T::Boolean, doc: T::Boolean, include_exported_rbis: T::Boolean, file_writer: Thor::Actions, number_of_workers: T.nilable(Integer)).void } - def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, default_command:, outpath:, file_header:, doc:, include_exported_rbis:, file_writer: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end - - sig { override.void } - def generate; end - - sig { params(should_verify: T::Boolean).void } - def sync(should_verify: T.unsafe(nil)); end - - private - - sig { returns(T::Array[String]) } - def added_rbis; end - - sig { params(cause: Symbol, files: T::Array[String]).returns(String) } - def build_error_for_files(cause, files); end - - sig { returns(Tapioca::Gemfile) } - def bundle; end - - sig { params(gem: Tapioca::Gemfile::GemSpec).void } - def compile_gem_rbi(gem); end - - sig { params(gem_name: String).returns(Pathname) } - def existing_rbi(gem_name); end - - sig { returns(T::Hash[String, String]) } - def existing_rbis; end - - sig { params(gem_name: String).returns(Pathname) } - def expected_rbi(gem_name); end - - sig { returns(T::Hash[String, String]) } - def expected_rbis; end - - sig { params(file: String, error: LoadError).void } - def explain_failed_require(file, error); end - - sig { params(gem_name: String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - - sig { params(gem_name: String, version: String).returns(Pathname) } - def gem_rbi_filename(gem_name, version); end - - sig { params(gem_names: T::Array[String]).returns(T::Array[Tapioca::Gemfile::GemSpec]) } - def gems_to_generate(gem_names); end - - sig { returns(Tapioca::Loader) } - def loader; end - - sig { params(gem: Tapioca::Gemfile::GemSpec, file: RBI::File).void } - def merge_with_exported_rbi(gem, file); end - - sig { params(old_filename: Pathname, new_filename: Pathname).void } - def move(old_filename, new_filename); end - - sig { void } - def perform_additions; end - - sig { void } - def perform_removals; end - - sig { void } - def perform_sync_verification; end - - sig { returns(T::Array[String]) } - def removed_rbis; end - - sig { params(diff: T::Hash[String, Symbol], command: String).void } - def report_diff_and_exit_if_out_of_date(diff, command); end - - sig { void } - def require_gem_file; end -end - -class Tapioca::Generators::Init < ::Tapioca::Generators::Base - sig { params(sorbet_config: String, tapioca_config: String, default_postrequire: String, default_command: String, file_writer: Thor::Actions).void } - def initialize(sorbet_config:, tapioca_config:, default_postrequire:, default_command:, file_writer: T.unsafe(nil)); end - - sig { override.void } - def generate; end - - private - - sig { void } - def create_binstub; end - - sig { void } - def create_post_require; end - - sig { void } - def create_sorbet_config; end - - sig { void } - def create_tapioca_config; end - - sig { returns(Bundler::Installer) } - def installer; end - - sig { returns(Bundler::StubSpecification) } - def spec; end -end - -class Tapioca::Generators::Require < ::Tapioca::Generators::Base - sig { params(requires_path: String, sorbet_config_path: String, default_command: String, file_writer: Thor::Actions).void } - def initialize(requires_path:, sorbet_config_path:, default_command:, file_writer: T.unsafe(nil)); end - - sig { override.void } - def generate; end -end - -class Tapioca::Generators::Todo < ::Tapioca::Generators::Base - sig { params(todo_file: String, file_header: T::Boolean, default_command: String, file_writer: Thor::Actions).void } - def initialize(todo_file:, file_header:, default_command:, file_writer: T.unsafe(nil)); end - - sig { override.void } - def generate; end - - sig { params(command: String, reason: T.nilable(String), strictness: T.nilable(String)).returns(String) } - def rbi_header(command, reason: T.unsafe(nil), strictness: T.unsafe(nil)); end -end - -module Tapioca::GenericTypeRegistry - class << self - sig { params(constant: Module).returns(T.nilable(T::Hash[T.any(Tapioca::TypeMember, Tapioca::TypeTemplate), String])) } - def lookup_type_variables(constant); end - - sig { params(constant: T.untyped, types: T.untyped).returns(Module) } - def register_type(constant, types); end - - sig { params(constant: T.untyped, type_variable: T.any(Tapioca::TypeMember, Tapioca::TypeTemplate)).void } - def register_type_variable(constant, type_variable); end - - private - - sig { params(constant: Module, name: String).returns(Module) } - def create_generic_type(constant, name); end - - sig { params(constant: Class).returns(Class) } - def create_safe_subclass(constant); end - - sig { params(constant: Module).returns(T::Hash[T.any(Tapioca::TypeMember, Tapioca::TypeTemplate), String]) } - def lookup_or_initialize_type_variables(constant); end - end -end - -Tapioca::GenericTypeRegistry::TypeVariable = T.type_alias { T.any(Tapioca::TypeMember, Tapioca::TypeTemplate) } - -class Tapioca::Loader - sig { params(gemfile: Tapioca::Gemfile, initialize_file: T.nilable(String), require_file: T.nilable(String)).void } - def load_bundle(gemfile, initialize_file, require_file); end - - sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void } - def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end - - private - - sig { void } - def eager_load_rails_app; end - - sig { void } - def load_rails_engines; end - - sig { returns(T::Array[T.untyped]) } - def rails_engines; end - - sig { params(file: T.nilable(String)).void } - def require_helper(file); end - - sig { params(path: String).void } - def safe_require(path); end - - sig { void } - def silence_deprecations; end -end - -module Tapioca::Reflection - extend ::Tapioca::Reflection - - sig { params(constant: Module).returns(T::Array[Module]) } - def ancestors_of(constant); end - - sig { params(object: BasicObject, other: BasicObject).returns(T::Boolean) } - def are_equal?(object, other); end - - sig { params(object: BasicObject).returns(Class) } - def class_of(object); end - - sig { params(symbol: String, inherit: T::Boolean, namespace: Module).returns(BasicObject) } - def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end - - sig { params(constant: Module).returns(T::Array[Symbol]) } - def constants_of(constant); end - - sig { type_parameters(:U).params(klass: T.type_parameter(:U)).returns(T::Array[T.type_parameter(:U)]) } - def descendants_of(klass); end - - sig { params(constant: Module).returns(T::Array[Module]) } - def inherited_ancestors_of(constant); end - - sig { params(constant: Module, method: Symbol).returns(Method) } - def method_of(constant, method); end - - sig { params(constant: Module).returns(T.nilable(String)) } - def name_of(constant); end - - sig { params(type: T::Types::Base).returns(String) } - def name_of_type(type); end - - sig { params(object: BasicObject).returns(Integer) } - def object_id_of(object); end - - sig { params(constant: Module).returns(T::Array[Symbol]) } - def private_instance_methods_of(constant); end - - sig { params(constant: Module).returns(T::Array[Symbol]) } - def protected_instance_methods_of(constant); end - - sig { params(constant: Module).returns(T::Array[Symbol]) } - def public_instance_methods_of(constant); end - - sig { params(constant: Module).returns(T.nilable(String)) } - def qualified_name_of(constant); end - - sig { params(method: T.any(Method, UnboundMethod)).returns(T.untyped) } - def signature_of(method); end - - sig { params(constant: Module).returns(Class) } - def singleton_class_of(constant); end - - sig { params(constant: Class).returns(T.nilable(Class)) } - def superclass_of(constant); end -end - -Tapioca::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) -Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) -module Tapioca::Trackers; end - -module Tapioca::Trackers::Autoload - class << self - sig { void } - def eager_load_all!; end - - sig { params(constant_name: String).void } - def register(constant_name); end - - sig { type_parameters(:Result).params(block: T.proc.returns(T.type_parameter(:Result))).returns(T.type_parameter(:Result)) } - def with_disabled_exits(&block); end - end -end - -Tapioca::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) - -module Tapioca::Trackers::ConstantDefinition - extend ::Tapioca::Reflection - - class << self - def files_for(klass); end - end -end - -module Tapioca::Trackers::Mixin - class << self - sig { params(constant: Module).returns(T::Hash[Tapioca::Trackers::Mixin::Type, T::Hash[Module, T::Array[String]]]) } - def mixin_locations_for(constant); end - - sig { params(constant: Module, mod: Module, mixin_type: Tapioca::Trackers::Mixin::Type, locations: T.nilable(T::Array[Thread::Backtrace::Location])).void } - def register(constant, mod, mixin_type, locations); end - end -end - -class Tapioca::Trackers::Mixin::Type < ::T::Enum - enums do - Prepend = new - Include = new - Extend = new - end -end - -class Tapioca::TypeMember < ::T::Types::TypeMember - sig { params(variance: Symbol, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } - def initialize(variance, fixed, lower, upper); end - - sig { returns(T.untyped) } - def fixed; end - - def lower; end - - sig { returns(T.nilable(String)) } - def name; end - - def name=(_arg0); end - - sig { returns(String) } - def serialize; end - - def upper; end -end - -class Tapioca::TypeTemplate < ::T::Types::TypeTemplate - sig { params(variance: Symbol, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } - def initialize(variance, fixed, lower, upper); end - - sig { returns(T.untyped) } - def fixed; end - - def lower; end - - sig { returns(T.nilable(String)) } - def name; end - - def name=(_arg0); end - - sig { returns(String) } - def serialize; end - - def upper; end -end - -Tapioca::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/thor@1.2.1.rbi b/sorbet/rbi/gems/thor@1.2.1.rbi deleted file mode 100644 index 0bcf2db6..00000000 --- a/sorbet/rbi/gems/thor@1.2.1.rbi +++ /dev/null @@ -1,844 +0,0 @@ -# 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`. - -class Thor - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - class << self - def check_unknown_options!(options = T.unsafe(nil)); end - def check_unknown_options?(config); end - def command_help(shell, command_name); end - def default_command(meth = T.unsafe(nil)); end - def default_task(meth = T.unsafe(nil)); end - def deprecation_warning(message); end - def desc(usage, description, options = T.unsafe(nil)); end - def disable_required_check!(*command_names); end - def disable_required_check?(command); end - def help(shell, subcommand = T.unsafe(nil)); end - def long_desc(long_description, options = T.unsafe(nil)); end - def map(mappings = T.unsafe(nil), **kw); end - def method_option(name, options = T.unsafe(nil)); end - def method_options(options = T.unsafe(nil)); end - def option(name, options = T.unsafe(nil)); end - def options(options = T.unsafe(nil)); end - def package_name(name, _ = T.unsafe(nil)); end - def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end - def stop_on_unknown_option!(*command_names); end - def stop_on_unknown_option?(command); end - def subcommand(subcommand, subcommand_class); end - def subcommand_classes; end - def subcommands; end - def subtask(subcommand, subcommand_class); end - def subtasks; end - def task_help(shell, command_name); end - - protected - - def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def baseclass; end - def create_command(meth); end - def create_task(meth); end - def disable_required_check; end - def dispatch(meth, given_args, given_opts, config); end - def dynamic_command_class; end - def find_command_possibilities(meth); end - def find_task_possibilities(meth); end - def initialize_added; end - def normalize_command_name(meth); end - def normalize_task_name(meth); end - def retrieve_command_name(args); end - def retrieve_task_name(args); end - def stop_on_unknown_option; end - def subcommand_help(cmd); end - def subtask_help(cmd); end - end -end - -module Thor::Actions - mixes_in_class_methods ::Thor::Actions::ClassMethods - - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end - - def action(instance); end - def add_file(destination, *args, &block); end - def add_link(destination, *args); end - def append_file(path, *args, &block); end - def append_to_file(path, *args, &block); end - def apply(path, config = T.unsafe(nil)); end - def behavior; end - def behavior=(_arg0); end - def chmod(path, mode, config = T.unsafe(nil)); end - def comment_lines(path, flag, *args); end - def copy_file(source, *args, &block); end - def create_file(destination, *args, &block); end - def create_link(destination, *args); end - def destination_root; end - def destination_root=(root); end - def directory(source, *args, &block); end - def empty_directory(destination, config = T.unsafe(nil)); end - def find_in_source_paths(file); end - def get(source, *args, &block); end - def gsub_file(path, flag, *args, &block); end - def in_root; end - def inject_into_class(path, klass, *args, &block); end - def inject_into_file(destination, *args, &block); end - def inject_into_module(path, module_name, *args, &block); end - def insert_into_file(destination, *args, &block); end - def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end - def link_file(source, *args); end - def prepend_file(path, *args, &block); end - def prepend_to_file(path, *args, &block); end - def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end - def remove_dir(path, config = T.unsafe(nil)); end - def remove_file(path, config = T.unsafe(nil)); end - def run(command, config = T.unsafe(nil)); end - def run_ruby_script(command, config = T.unsafe(nil)); end - def source_paths; end - def template(source, *args, &block); end - def thor(command, *args); end - def uncomment_lines(path, flag, *args); end - - protected - - def _cleanup_options_and_set(options, key); end - def _shared_configuration; end - - private - - def capture(*args); end - def concat(string); end - def output_buffer; end - def output_buffer=(_arg0); end - def with_output_buffer(buf = T.unsafe(nil)); end - - class << self - def included(base); end - end -end - -class Thor::Actions::CapturableERB < ::ERB - def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end -end - -module Thor::Actions::ClassMethods - def add_runtime_options!; end - def source_paths; end - def source_paths_for_search; end - def source_root(path = T.unsafe(nil)); end -end - -class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory - def initialize(base, destination, data, config = T.unsafe(nil)); end - - def data; end - def identical?; end - def invoke!; end - def render; end - - protected - - def force_on_collision?; end - def force_or_skip_or_conflict(force, skip, &block); end - def on_conflict_behavior(&block); end -end - -class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile - def data; end - def exists?; end - def identical?; end - def invoke!; end -end - -class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory - def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end - - def invoke!; end - def revoke!; end - def source; end - - protected - - def execute!; end - def file_level_lookup(previous_lookup); end - def files(lookup); end -end - -class Thor::Actions::EmptyDirectory - def initialize(base, destination, config = T.unsafe(nil)); end - - def base; end - def config; end - def destination; end - def exists?; end - def given_destination; end - def invoke!; end - def relative_destination; end - def revoke!; end - - protected - - def convert_encoded_instructions(filename); end - def destination=(destination); end - def invoke_with_conflict_check(&block); end - def on_conflict_behavior; end - def on_file_clash_behavior; end - def pretend?; end - def say_status(status, color); end -end - -class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory - def initialize(base, destination, data, config); end - - def behavior; end - def flag; end - def invoke!; end - def replacement; end - def revoke!; end - - protected - - def replace!(regexp, string, force); end - def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end -end - -Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) -class Thor::AmbiguousCommandError < ::Thor::Error; end -Thor::AmbiguousTaskError = Thor::AmbiguousCommandError - -class Thor::Argument - def initialize(name, options = T.unsafe(nil)); end - - def banner; end - def default; end - def description; end - def enum; end - def human_name; end - def name; end - def required; end - def required?; end - def show_default?; end - def type; end - def usage; end - - protected - - def default_banner; end - def valid_type?(type); end - def validate!; end -end - -Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) - -class Thor::Arguments - def initialize(arguments = T.unsafe(nil)); end - - def parse(args); end - def remaining; end - - private - - def check_requirement!; end - def current_is_value?; end - def last?; end - def no_or_skip?(arg); end - def parse_array(name); end - def parse_hash(name); end - def parse_numeric(name); end - def parse_string(name); end - def peek; end - def shift; end - def unshift(arg); end - - class << self - def parse(*args); end - def split(args); end - end -end - -Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) - -module Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - - mixes_in_class_methods ::Thor::Base::ClassMethods - mixes_in_class_methods ::Thor::Invocation::ClassMethods - - def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end - - def args; end - def args=(_arg0); end - def options; end - def options=(_arg0); end - def parent_options; end - def parent_options=(_arg0); end - - class << self - def included(base); end - def register_klass_file(klass); end - def shell; end - def shell=(_arg0); end - def subclass_files; end - def subclasses; end - end -end - -module Thor::Base::ClassMethods - def all_commands; end - def all_tasks; end - def allow_incompatible_default_type!; end - def argument(name, options = T.unsafe(nil)); end - def arguments; end - def attr_accessor(*_arg0); end - def attr_reader(*_arg0); end - def attr_writer(*_arg0); end - def check_default_type; end - def check_default_type!; end - def check_unknown_options; end - def check_unknown_options!; end - def check_unknown_options?(config); end - def class_option(name, options = T.unsafe(nil)); end - def class_options(options = T.unsafe(nil)); end - def commands; end - def disable_required_check?(command_name); end - def exit_on_failure?; end - def group(name = T.unsafe(nil)); end - def handle_argument_error(command, error, args, arity); end - def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end - def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end - def namespace(name = T.unsafe(nil)); end - def no_commands(&block); end - def no_commands?; end - def no_commands_context; end - def no_tasks(&block); end - def public_command(*names); end - def public_task(*names); end - def remove_argument(*names); end - def remove_class_option(*names); end - def remove_command(*names); end - def remove_task(*names); end - def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end - def stop_on_unknown_option?(command_name); end - def strict_args_position; end - def strict_args_position!; end - def strict_args_position?(config); end - def tasks; end - - protected - - def baseclass; end - def basename; end - def build_option(name, options, scope); end - def build_options(options, scope); end - def class_options_help(shell, groups = T.unsafe(nil)); end - def create_command(meth); end - def create_task(meth); end - def dispatch(command, given_args, given_opts, config); end - def find_and_refresh_command(name); end - def find_and_refresh_task(name); end - def from_superclass(method, default = T.unsafe(nil)); end - def inherited(klass); end - def initialize_added; end - def is_thor_reserved_word?(word, type); end - def method_added(meth); end - def print_options(shell, options, group_name = T.unsafe(nil)); end -end - -class Thor::Command < ::Struct - def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end - - def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - def hidden?; end - def run(instance, args = T.unsafe(nil)); end - - protected - - def handle_argument_error?(instance, error, caller); end - def handle_no_method_error?(instance, error, caller); end - def local_method?(instance, name); end - def not_debugging?(instance); end - def private_method?(instance); end - def public_method?(instance); end - def required_arguments_for(klass, usage); end - def required_options; end - def sans_backtrace(backtrace, caller); end - - private - - def initialize_copy(other); end -end - -Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) -module Thor::CoreExt; end - -class Thor::CoreExt::HashWithIndifferentAccess < ::Hash - def initialize(hash = T.unsafe(nil)); end - - def [](key); end - def []=(key, value); end - def delete(key); end - def except(*keys); end - def fetch(key, *args); end - def key?(key); end - def merge(other); end - def merge!(other); end - def replace(other_hash); end - def reverse_merge(other); end - def reverse_merge!(other_hash); end - def to_hash; end - def values_at(*indices); end - - protected - - def convert_key(key); end - def method_missing(method, *args); end -end - -Thor::Correctable = DidYouMean::Correctable - -class Thor::DynamicCommand < ::Thor::Command - def initialize(name, options = T.unsafe(nil)); end - - def run(instance, args = T.unsafe(nil)); end -end - -Thor::DynamicTask = Thor::DynamicCommand -class Thor::Error < ::StandardError; end - -class Thor::Group - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - protected - - def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end - - class << self - def class_options_help(shell, groups = T.unsafe(nil)); end - def desc(description = T.unsafe(nil)); end - def get_options_from_invocations(group_options, base_options); end - def handle_argument_error(command, error, _args, arity); end - def help(shell); end - def invocation_blocks; end - def invocations; end - def invoke(*names, &block); end - def invoke_from_option(*names, &block); end - def printable_commands(*_arg0); end - def printable_tasks(*_arg0); end - def remove_invocation(*names); end - - protected - - def banner; end - def baseclass; end - def create_command(meth); end - def create_task(meth); end - def dispatch(command, given_args, given_opts, config); end - def self_command; end - def self_task; end - end -end - -Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) - -class Thor::HiddenCommand < ::Thor::Command - def hidden?; end -end - -Thor::HiddenTask = Thor::HiddenCommand - -module Thor::Invocation - mixes_in_class_methods ::Thor::Invocation::ClassMethods - - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end - - def current_command_chain; end - def invoke(name = T.unsafe(nil), *args); end - def invoke_all; end - def invoke_command(command, *args); end - def invoke_task(command, *args); end - def invoke_with_padding(*args); end - - protected - - def _parse_initialization_options(args, opts, config); end - def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end - def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end - def _shared_configuration; end - - class << self - def included(base); end - end -end - -module Thor::Invocation::ClassMethods - def prepare_for_invocation(key, name); end -end - -class Thor::InvocationError < ::Thor::Error; end - -module Thor::LineEditor - class << self - def best_available; end - def readline(prompt, options = T.unsafe(nil)); end - end -end - -class Thor::LineEditor::Basic - def initialize(prompt, options); end - - def options; end - def prompt; end - def readline; end - - private - - def echo?; end - def get_input; end - - class << self - def available?; end - end -end - -class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic - def readline; end - - private - - def add_to_history?; end - def completion_options; end - def completion_proc; end - def use_path_completion?; end - - class << self - def available?; end - end -end - -class Thor::LineEditor::Readline::PathCompletion - def initialize(text); end - - def matches; end - - private - - def absolute_matches; end - def base_path; end - def glob_pattern; end - def relative_matches; end - def text; end -end - -class Thor::MalformattedArgumentError < ::Thor::InvocationError; end - -class Thor::NestedContext - def initialize; end - - def enter; end - def entered?; end - - private - - def pop; end - def push; end -end - -class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker - def initialize(dictionary); end -end - -class Thor::Option < ::Thor::Argument - def initialize(name, options = T.unsafe(nil)); end - - def aliases; end - def array?; end - def boolean?; end - def group; end - def hash?; end - def hide; end - def human_name; end - def lazy_default; end - def numeric?; end - def repeatable; end - def string?; end - def switch_name; end - def usage(padding = T.unsafe(nil)); end - - protected - - def dasherize(str); end - def dasherized?; end - def undasherize(str); end - def validate!; end - def validate_default_type!; end - - class << self - def parse(key, value); end - end -end - -Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) - -class Thor::Options < ::Thor::Arguments - def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end - - def check_unknown!; end - def parse(args); end - def peek; end - def remaining; end - def shift; end - def unshift(arg, is_value: T.unsafe(nil)); end - - protected - - def assign_result!(option, result); end - def current_is_switch?; end - def current_is_switch_formatted?; end - def current_is_value?; end - def normalize_switch(arg); end - def parse_boolean(switch); end - def parse_peek(switch, option); end - def parsing_options?; end - def switch?(arg); end - def switch_option(arg); end - - class << self - def to_switches(options); end - end -end - -Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) -Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) -Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) -Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) -Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) -Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) - -module Thor::RakeCompat - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - include ::Rake::DSL - - class << self - def included(base); end - def rake_classes; end - end -end - -class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end -module Thor::Sandbox; end - -module Thor::Shell - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end - - def ask(*args, &block); end - def error(*args, &block); end - def file_collision(*args, &block); end - def no?(*args, &block); end - def print_in_columns(*args, &block); end - def print_table(*args, &block); end - def print_wrapped(*args, &block); end - def say(*args, &block); end - def say_error(*args, &block); end - def say_status(*args, &block); end - def set_color(*args, &block); end - def shell; end - def shell=(_arg0); end - def terminal_width(*args, &block); end - def with_padding; end - def yes?(*args, &block); end - - protected - - def _shared_configuration; end -end - -class Thor::Shell::Basic - def initialize; end - - def ask(statement, *args); end - def base; end - def base=(_arg0); end - def error(statement); end - def file_collision(destination); end - def indent(count = T.unsafe(nil)); end - def mute; end - def mute?; end - def no?(statement, color = T.unsafe(nil)); end - def padding; end - def padding=(value); end - def print_in_columns(array); end - def print_table(array, options = T.unsafe(nil)); end - def print_wrapped(message, options = T.unsafe(nil)); end - def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - def say_status(status, message, log_status = T.unsafe(nil)); end - def set_color(string, *_arg1); end - def terminal_width; end - def yes?(statement, color = T.unsafe(nil)); end - - protected - - def answer_match(possibilities, answer, case_insensitive); end - def as_unicode; end - def ask_filtered(statement, color, options); end - def ask_simply(statement, color, options); end - def can_display_colors?; end - def dynamic_width; end - def dynamic_width_stty; end - def dynamic_width_tput; end - def file_collision_help; end - def git_merge_tool; end - def is?(value); end - def lookup_color(color); end - def merge(destination, content); end - def merge_tool; end - def prepare_message(message, *color); end - def quiet?; end - def show_diff(destination, content); end - def stderr; end - def stdout; end - def truncate(string, width); end - def unix?; end -end - -Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - -class Thor::Shell::Color < ::Thor::Shell::Basic - def set_color(string, *colors); end - - protected - - def are_colors_disabled?; end - def are_colors_supported?; end - def can_display_colors?; end - def diff_lcs_loaded?; end - def output_diff_line(diff); end - def show_diff(destination, content); end -end - -Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) -Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) -Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) -Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) -Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) -Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) -Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) -Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) -Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) -Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) -Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) - -class Thor::Shell::HTML < ::Thor::Shell::Basic - def ask(statement, color = T.unsafe(nil)); end - def set_color(string, *colors); end - - protected - - def can_display_colors?; end - def diff_lcs_loaded?; end - def output_diff_line(diff); end - def show_diff(destination, content); end -end - -Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) -Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) -Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) -Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) -Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) -Thor::Task = Thor::Command - -class Thor::UndefinedCommandError < ::Thor::Error - include ::DidYouMean::Correctable - - def initialize(command, all_commands, namespace); end - - def all_commands; end - def command; end -end - -class Thor::UndefinedCommandError::SpellChecker - def initialize(error); end - - def corrections; end - def error; end - def spell_checker; end -end - -Thor::UndefinedTaskError = Thor::UndefinedCommandError - -class Thor::UnknownArgumentError < ::Thor::Error - include ::DidYouMean::Correctable - - def initialize(switches, unknown); end - - def switches; end - def unknown; end -end - -class Thor::UnknownArgumentError::SpellChecker - def initialize(error); end - - def corrections; end - def error; end - def spell_checker; end -end - -module Thor::Util - class << self - def camel_case(str); end - def escape_globs(path); end - def escape_html(string); end - def find_by_namespace(namespace); end - def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end - def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end - def globs_for(path); end - def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end - def namespace_from_thor_class(constant); end - def namespaces_in_content(contents, file = T.unsafe(nil)); end - def ruby_command; end - def snake_case(str); end - def thor_classes_in(klass); end - def thor_root; end - def thor_root_glob; end - def user_home; end - end -end diff --git a/sorbet/rbi/gems/thor@1.5.0.rbi b/sorbet/rbi/gems/thor@1.5.0.rbi new file mode 100644 index 00000000..1e2610a8 --- /dev/null +++ b/sorbet/rbi/gems/thor@1.5.0.rbi @@ -0,0 +1,3870 @@ +# 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`. + + +# pkg:gem/thor#lib/thor/shell/lcs_diff.rb:1 +module LCSDiff + protected + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # pkg:gem/thor#lib/thor/shell/lcs_diff.rb:6 + def show_diff(destination, content); end + + private + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # pkg:gem/thor#lib/thor/shell/lcs_diff.rb:37 + def diff_lcs_loaded?; end + + # pkg:gem/thor#lib/thor/shell/lcs_diff.rb:21 + def output_diff_line(diff); end +end + +# pkg:gem/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 + + # pkg:gem/thor#lib/thor.rb:663 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:678 + def tree; end + + private + + # pkg:gem/thor#lib/thor.rb:684 + def build_command_tree(klass, indent); end + + class << self + # pkg:gem/thor#lib/thor.rb:250 + def at_least_one(*args, &block); end + + # Extend check unknown options to accept a hash of conditions. + # + # === Parameters + # options<Hash>: A hash containing :only and/or :except keys + # + # pkg:gem/thor#lib/thor.rb:350 + def check_unknown_options!(options = T.unsafe(nil)); end + + # Overwrite check_unknown_options? to take subcommands and options into account. + # + # pkg:gem/thor#lib/thor.rb:363 + def check_unknown_options?(config); end + + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # pkg:gem/thor#lib/thor.rb:449 + def command_exists?(command_name); end + + # Prints help information for the given command. + # + # ==== Parameters + # shell<Thor::Shell> + # command_name<String> + # + # pkg:gem/thor#lib/thor.rb:258 + def command_help(shell, command_name); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth<Symbol>:: name of the default command + # + # pkg:gem/thor#lib/thor.rb:21 + def default_command(meth = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:28 + def default_task(meth = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/base.rb:27 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage<String> + # description<String> + # options<String> + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor.rb:434 + def disable_required_check!(*command_names); end + + # pkg:gem/thor#lib/thor.rb:438 + def disable_required_check?(command); end + + # pkg:gem/thor#lib/thor.rb:207 + def exclusive(*args, &block); end + + # Prints help information for this class. + # + # ==== Parameters + # shell<Thor::Shell> + # + # pkg:gem/thor#lib/thor.rb:288 + def help(shell, subcommand = T.unsafe(nil)); end + + # Defines the long description of the next command. + # + # Long description is by default indented, line-wrapped and repeated whitespace merged. + # In order to print long description verbatim, with indentation and spacing exactly + # as found in the code, use the +wrap+ option + # + # long_desc 'your very long description', wrap: false + # + # ==== Parameters + # long description<String> + # options<Hash> + # + # pkg:gem/thor#lib/thor.rb:78 + def long_desc(long_description, options = T.unsafe(nil)); end + + # Maps an input to a command. If you define: + # + # map "-T" => "list" + # + # Running: + # + # thor -T + # + # Will invoke the list command. + # + # ==== Parameters + # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. + # + # pkg:gem/thor#lib/thor.rb:101 + def map(mappings = T.unsafe(nil), **kw); end + + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options<Hash>:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # pkg:gem/thor#lib/thor.rb:246 + def method_at_least_one(*args, &block); end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options<Hash>:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # pkg:gem/thor#lib/thor.rb:203 + def method_exclusive(*args, &block); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name<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. + # + # pkg:gem/thor#lib/thor.rb:163 + def method_option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # pkg:gem/thor#lib/thor.rb:129 + def method_options(options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:175 + def option(name, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:135 + def options(options = T.unsafe(nil)); end + + # Allows for custom "Command" package naming. + # + # === Parameters + # name<String> + # options<Hash> + # + # pkg:gem/thor#lib/thor.rb:12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # pkg:gem/thor#lib/thor.rb:309 + def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:318 + 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 + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor.rb:420 + def stop_on_unknown_option!(*command_names); end + + # pkg:gem/thor#lib/thor.rb:424 + def stop_on_unknown_option?(command); end + + # pkg:gem/thor#lib/thor.rb:329 + def subcommand(subcommand, subcommand_class); end + + # pkg:gem/thor#lib/thor.rb:325 + def subcommand_classes; end + + # pkg:gem/thor#lib/thor.rb:320 + def subcommands; end + + # pkg:gem/thor#lib/thor.rb:344 + def subtask(subcommand, subcommand_class); end + + # pkg:gem/thor#lib/thor.rb:323 + def subtasks; end + + # pkg:gem/thor#lib/thor.rb:281 + 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. + # + # pkg:gem/thor#lib/thor.rb:546 + def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:552 + def baseclass; end + + # pkg:gem/thor#lib/thor.rb:560 + def create_command(meth); end + + # pkg:gem/thor#lib/thor.rb:584 + def create_task(meth); end + + # help command has the required check disabled by default. + # + # pkg:gem/thor#lib/thor.rb:478 + def disable_required_check; end + + # The method responsible for dispatching given the args. + # + # pkg:gem/thor#lib/thor.rb:505 + def dispatch(meth, given_args, given_opts, config); end + + # pkg:gem/thor#lib/thor.rb:556 + def dynamic_command_class; end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # pkg:gem/thor#lib/thor.rb:626 + def find_command_possibilities(meth); end + + # pkg:gem/thor#lib/thor.rb:639 + def find_task_possibilities(meth); end + + # pkg:gem/thor#lib/thor.rb:586 + def initialize_added; end + + # Returns this class at least one of required options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # pkg:gem/thor#lib/thor.rb:469 + def method_at_least_one_option_names; end + + # Returns this class exclusive options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # pkg:gem/thor#lib/thor.rb:460 + def method_exclusive_option_names; end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # pkg:gem/thor#lib/thor.rb:605 + def normalize_command_name(meth); end + + # pkg:gem/thor#lib/thor.rb:621 + def normalize_task_name(meth); end + + # pkg:gem/thor#lib/thor.rb:493 + def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor.rb:482 + def print_exclusive_options(shell, command = T.unsafe(nil)); end + + # Retrieve the command name from given args. + # + # pkg:gem/thor#lib/thor.rb:592 + def retrieve_command_name(args); end + + # pkg:gem/thor#lib/thor.rb:596 + def retrieve_task_name(args); end + + # Sort the commands, lexicographically by default. + # + # Can be overridden in the subclass to change the display order of the + # commands. + # + # pkg:gem/thor#lib/thor.rb:653 + def sort_commands!(list); end + + # pkg:gem/thor#lib/thor.rb:473 + def stop_on_unknown_option; end + + # pkg:gem/thor#lib/thor.rb:641 + def subcommand_help(cmd); end + + # pkg:gem/thor#lib/thor.rb:647 + def subtask_help(cmd); end + end +end + +# pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions.rb:89 + def action(instance); end + + # pkg:gem/thor#lib/thor/actions/create_file.rb:27 + def add_file(destination, *args, &block); end + + # pkg:gem/thor#lib/thor/actions/create_link.rb:22 + def add_link(destination, *args); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:197 + 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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:192 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path<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" + # + # pkg:gem/thor#lib/thor/actions.rb:216 + def apply(path, config = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/actions.rb:10 + def behavior; end + + # pkg:gem/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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:145 + def chmod(path, mode, config = T.unsafe(nil)); end + + # Comment all lines matching a given regex. It will leave the space + # which existed before the beginning of the line in tact and will insert + # a single space after the comment hash. + # + # ==== Parameters + # path<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/ + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:333 + def comment_lines(path, flag, *args); end + + # Copies the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source<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, and + # :mode => :preserve, to preserve the file mode from the source. + # + # ==== Examples + # + # copy_file "README", "doc/README" + # + # copy_file "doc/README" + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:20 + def copy_file(source, *args, &block); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination<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" + # + # pkg:gem/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" + # + # pkg:gem/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). + # + # pkg:gem/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. + # + # pkg:gem/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 + # + # pkg:gem/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" + # + # pkg:gem/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. + # + # pkg:gem/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, and + # :http_headers => <Hash> to add headers to an http request. + # + # ==== Examples + # + # get "http://gist.github.com/103208", "doc/README" + # + # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"} + # + # get "http://gist.github.com/103208" do |content| + # content.split("\n").first + # end + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:81 + 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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:291 + def gsub_file(path, flag, *args, &block); end + + # Run a regular expression replacement on a file, raising an error if the + # contents of the file are not changed. + # + # ==== 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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:263 + def gsub_file!(path, flag, *args, &block); end + + # Goes to the root and execute the given block. + # + # pkg:gem/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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:216 + def inject_into_class(path, klass, *args, &block); end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:64 + def inject_into_file(destination, *args, &block); end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:35 + 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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:239 + def inject_into_module(path, module_name, *args, &block); 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 + # + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:56 + def insert_into_file(destination, *args, &block); end + + # Injects the given content into a file, raising an error if the contents of + # the file are not changed. 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 + # + # pkg:gem/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. + # + # pkg:gem/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" + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:50 + def link_file(source, *args); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:175 + 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 + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:170 + def prepend_to_file(path, *args, &block); end + + # Returns the given path relative to the absolute root (ie, root where + # the script started). + # + # pkg:gem/thor#lib/thor/actions.rb:114 + def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:360 + 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' + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:350 + 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 + # + # pkg:gem/thor#lib/thor/actions.rb:248 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command<String>:: the command to be executed. + # config<Hash>:: give :verbose => false to not log the status. + # + # pkg:gem/thor#lib/thor/actions.rb:285 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # pkg:gem/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" + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:117 + def template(source, *args, &block); end + + # Run a thor command. A hash of options can be given and it's converted to + # switches. + # + # ==== Parameters + # command<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 + # + # pkg:gem/thor#lib/thor/actions.rb:308 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. Preserves indentation before + # the comment hash and removes the hash and any immediate following space. + # + # ==== Parameters + # path<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/ + # + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:314 + def uncomment_lines(path, flag, *args); end + + protected + + # pkg:gem/thor#lib/thor/actions.rb:329 + def _cleanup_options_and_set(options, key); end + + # Allow current root to be shared between invocations. + # + # pkg:gem/thor#lib/thor/actions.rb:325 + def _shared_configuration; end + + private + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:385 + def actually_gsub_file(path, flag, args, error_on_no_change, &block); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:371 + def capture(*args); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:367 + def concat(string); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:362 + def output_buffer; end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:362 + def output_buffer=(_arg0); end + + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:375 + def with_output_buffer(buf = T.unsafe(nil)); end + + class << self + # pkg:gem/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. +# +# pkg:gem/thor#lib/thor/actions/file_manipulation.rb:398 +class Thor::Actions::CapturableERB < ::ERB + # pkg:gem/thor#lib/thor/actions/file_manipulation.rb:399 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# pkg:gem/thor#lib/thor/actions.rb:17 +module Thor::Actions::ClassMethods + # Add runtime options that help actions execution. + # + # pkg:gem/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. + # + # pkg:gem/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 + # + # pkg:gem/thor#lib/thor/actions.rb:38 + def source_paths_for_search; end + + # Stores and return the source root for this class + # + # pkg:gem/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. +# +# pkg:gem/thor#lib/thor/actions/create_file.rb:32 +class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory + # pkg:gem/thor#lib/thor/actions/create_file.rb:35 + def initialize(base, destination, data, config = T.unsafe(nil)); end + + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions/create_file.rb:45 + def identical?; end + + # pkg:gem/thor#lib/thor/actions/create_file.rb:60 + def invoke!; end + + # Holds the content to be added to the file. + # + # pkg:gem/thor#lib/thor/actions/create_file.rb:52 + def render; end + + protected + + # Shows the file collision menu to the user and gets the result. + # + # pkg:gem/thor#lib/thor/actions/create_file.rb:100 + def force_on_collision?; end + + # If force is true, run the action, otherwise check if it's not being + # skipped. If both are false, show the file_collision menu, if the menu + # returns true, force it, otherwise skip. + # + # pkg:gem/thor#lib/thor/actions/create_file.rb:86 + def force_or_skip_or_conflict(force, skip, &block); end + + # Now on conflict we check if the file is identical or not. + # + # pkg:gem/thor#lib/thor/actions/create_file.rb:73 + def on_conflict_behavior(&block); end +end + +# CreateLink is a subset of CreateFile, which instead of taking a block of +# data, just takes a source string from the user. +# +# pkg:gem/thor#lib/thor/actions/create_link.rb:27 +class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile + # pkg:gem/thor#lib/thor/actions/create_link.rb:28 + def data; end + + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions/create_link.rb:35 + def identical?; end + + # pkg:gem/thor#lib/thor/actions/create_link.rb:40 + def invoke!; end +end + +# pkg:gem/thor#lib/thor/actions/directory.rb:55 +class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory + # pkg:gem/thor#lib/thor/actions/directory.rb:58 + def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # pkg:gem/thor#lib/thor/actions/directory.rb:64 + def invoke!; end + + # pkg:gem/thor#lib/thor/actions/directory.rb:69 + def revoke!; end + + # pkg:gem/thor#lib/thor/actions/directory.rb:56 + def source; end + + protected + + # pkg:gem/thor#lib/thor/actions/directory.rb:75 + def execute!; end + + # pkg:gem/thor#lib/thor/actions/directory.rb:99 + def file_level_lookup(previous_lookup); end + + # pkg:gem/thor#lib/thor/actions/directory.rb:103 + def files(lookup); end +end + +# Class which holds create directory logic. This is the base class for +# other actions like create_file and directory. +# +# This implementation is based in Templater actions, created by Jonas Nicklas +# and Michael S. Klishin under MIT LICENSE. +# +# pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:24 + def base; end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:24 + def config; end + + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:45 + def exists?; end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:24 + def given_destination; end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:49 + def invoke!; end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:24 + def relative_destination; end + + # pkg:gem/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. + # + # pkg:gem/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 + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:132 + def on_conflict_behavior; end + + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # pkg:gem/thor#lib/thor/actions/empty_directory.rb:138 + def say_status(status, color); end +end + +# pkg:gem/thor#lib/thor/actions/inject_into_file.rb:66 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:69 + def initialize(base, destination, data, config); end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:67 + def behavior; end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:67 + def flag; end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:83 + def invoke!; end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:67 + def replacement; end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:107 + def revoke!; end + + protected + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:143 + def content; end + + # Adds the content to the file. + # + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:153 + def replace!(regexp, string, force); end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:147 + def replacement_present?; end + + # pkg:gem/thor#lib/thor/actions/inject_into_file.rb:123 + def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end +end + +# pkg:gem/thor#lib/thor/actions/inject_into_file.rb:5 +Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/thor#lib/thor/error.rb:57 +class Thor::AmbiguousCommandError < ::Thor::Error; end + +# pkg:gem/thor#lib/thor/error.rb:59 +Thor::AmbiguousTaskError = Thor::AmbiguousCommandError + +# pkg:gem/thor#lib/thor/parser/argument.rb:2 +class Thor::Argument + # pkg:gem/thor#lib/thor/parser/argument.rb:8 + def initialize(name, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def banner; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def default; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def description; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def enum; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:52 + def enum_to_s; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:6 + def human_name; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def name; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:27 + def print_default; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def required; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:39 + def required?; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:43 + def show_default?; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:5 + def type; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:35 + def usage; end + + protected + + # pkg:gem/thor#lib/thor/parser/argument.rb:71 + def default_banner; end + + # pkg:gem/thor#lib/thor/parser/argument.rb:67 + def valid_type?(type); end + + # pkg:gem/thor#lib/thor/parser/argument.rb:62 + def validate!; end +end + +# pkg:gem/thor#lib/thor/parser/argument.rb:3 +Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/thor#lib/thor/parser/arguments.rb:2 +class Thor::Arguments + # Takes an array of Thor::Argument objects. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:26 + def initialize(arguments = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:40 + def parse(args); end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:53 + def remaining; end + + private + + # Raises an error if @non_assigned_required array is not empty. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:186 + def check_requirement!; end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:84 + def current_is_value?; end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:64 + def last?; end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:59 + def no_or_skip?(arg); end + + # Runs through the argument array getting all strings until no string is + # found or a switch is found. + # + # ["a", "b", "c"] + # + # And returns it as an array: + # + # ["a", "b", "c"] + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:118 + def parse_array(name); end + + # Runs through the argument array getting strings that contains ":" and + # mark it as a hash: + # + # [ "name:string", "age:integer" ] + # + # Becomes: + # + # { "name" => "string", "age" => "integer" } + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:97 + def parse_hash(name); end + + # Check if the peek is numeric format and return a Float or Integer. + # Check if the peek is included in enum if enum is provided. + # Otherwise raises an error. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:139 + def parse_numeric(name); end + + # Parse string: + # for --string-arg, just return the current value in the pile + # for --no-string-arg, nil + # Check if the peek is included in enum if enum is provided. Otherwise raises an error. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:158 + def parse_string(name); end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:68 + def peek; end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:72 + def shift; end + + # pkg:gem/thor#lib/thor/parser/arguments.rb:76 + def unshift(arg); end + + # Raises an error if the switch is an enum and the values aren't included on it. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:172 + def validate_enum_value!(name, value, message); end + + class << self + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/parser/arguments.rb:8 + def split(args); end + end +end + +# pkg:gem/thor#lib/thor/parser/arguments.rb:3 +Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/thor#lib/thor/error.rb:104 +class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end + +# pkg:gem/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. + # + # pkg:gem/thor#lib/thor/base.rb:54 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/base.rb:36 + def args; end + + # pkg:gem/thor#lib/thor/base.rb:36 + def args=(_arg0); end + + # pkg:gem/thor#lib/thor/base.rb:36 + def options; end + + # pkg:gem/thor#lib/thor/base.rb:36 + def options=(_arg0); end + + # pkg:gem/thor#lib/thor/base.rb:36 + def parent_options; end + + # pkg:gem/thor#lib/thor/base.rb:36 + def parent_options=(_arg0); end + + class << self + # pkg:gem/thor#lib/thor/base.rb:117 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:145 + 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. + # + # pkg:gem/thor#lib/thor/shell.rb:11 + def shell; 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. + # + # pkg:gem/thor#lib/thor/shell.rb:6 + def shell=(_arg0); end + + # Returns the files where the subclasses are kept. + # + # ==== Returns + # Hash[path<String> => Class] + # + # pkg:gem/thor#lib/thor/base.rb:138 + def subclass_files; end + + # Returns the classes that inherits from Thor or Thor::Group. + # + # ==== Returns + # Array[Class] + # + # pkg:gem/thor#lib/thor/base.rb:129 + def subclasses; end + end +end + +# pkg:gem/thor#lib/thor/base.rb:154 +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. + # + # pkg:gem/thor#lib/thor/base.rb:483 + def all_commands; end + + # pkg:gem/thor#lib/thor/base.rb:487 + 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!` + # + # pkg:gem/thor#lib/thor/base.rb:190 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:262 + def argument(name, options = T.unsafe(nil)); end + + # Returns this class arguments, looking up in the ancestors chain. + # + # ==== Returns + # Array[Thor::Argument] + # + # pkg:gem/thor#lib/thor/base.rb:294 + def arguments; end + + # pkg:gem/thor#lib/thor/base.rb:163 + def attr_accessor(*_arg0); end + + # pkg:gem/thor#lib/thor/base.rb:155 + def attr_reader(*_arg0); end + + # pkg:gem/thor#lib/thor/base.rb:159 + def attr_writer(*_arg0); end + + # pkg:gem/thor#lib/thor/base.rb:194 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:184 + def check_default_type!; end + + # pkg:gem/thor#lib/thor/base.rb:173 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:169 + def check_unknown_options!; end + + # pkg:gem/thor#lib/thor/base.rb:177 + def check_unknown_options?(config); end + + # Adds and declares option group for required at least one of options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Examples + # + # class_at_least_one do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use class_at_least_one and class_exclusive at the same time. + # + # class_exclusive do + # class_at_least_one do + # class_option :one + # class_option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # pkg:gem/thor#lib/thor/base.rb:393 + def class_at_least_one(*args, &block); end + + # Returns this class at least one of required options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # pkg:gem/thor#lib/thor/base.rb:412 + def class_at_least_one_option_names; end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Parameters + # Array[Thor::Option.name] + # + # ==== Examples + # + # class_exclusive do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # pkg:gem/thor#lib/thor/base.rb:358 + def class_exclusive(*args, &block); end + + # Returns this class exclusive options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # pkg:gem/thor#lib/thor/base.rb:403 + def class_exclusive_option_names; 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. + # + # pkg:gem/thor#lib/thor/base.rb:329 + 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] + # + # pkg:gem/thor#lib/thor/base.rb:307 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:472 + def commands; end + + # If true, option set will not suspend the execution of the command when + # a required option is not provided. + # + # pkg:gem/thor#lib/thor/base.rb:208 + def disable_required_check?(command_name); end + + # A flag that makes the process exit with status 1 if any error happens. + # + # pkg:gem/thor#lib/thor/base.rb:629 + 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> + # + # pkg:gem/thor#lib/thor/base.rb:458 + def group(name = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/base.rb:619 + def handle_argument_error(command, error, args, arity); end + + # pkg:gem/thor#lib/thor/base.rb:614 + def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/base.rb:617 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:567 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:531 + def no_commands(&block); end + + # pkg:gem/thor#lib/thor/base.rb:541 + def no_commands?; end + + # pkg:gem/thor#lib/thor/base.rb:537 + def no_commands_context; end + + # pkg:gem/thor#lib/thor/base.rb:535 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:607 + def public_command(*names); end + + # pkg:gem/thor#lib/thor/base.rb:612 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:427 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:446 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:501 + def remove_command(*names); end + + # pkg:gem/thor#lib/thor/base.rb:510 + 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) + # + # pkg:gem/thor#lib/thor/base.rb:583 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:202 + def stop_on_unknown_option?(command_name); end + + # pkg:gem/thor#lib/thor/base.rb:219 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:215 + def strict_args_position!; end + + # pkg:gem/thor#lib/thor/base.rb:223 + def strict_args_position?(config); end + + # pkg:gem/thor#lib/thor/base.rb:475 + def tasks; end + + protected + + # SIGNATURE: Sets the baseclass. This is where the superclass lookup + # finishes. + # + # pkg:gem/thor#lib/thor/base.rb:778 + def baseclass; end + + # The basename of the program invoking the thor class. + # + # pkg:gem/thor#lib/thor/base.rb:772 + 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 + # + # pkg:gem/thor#lib/thor/base.rb:689 + 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] + # + # pkg:gem/thor#lib/thor/base.rb:700 + def build_options(options, scope); end + + # Get target(method_options or class_options) options + # of before and after by block evaluation. + # + # pkg:gem/thor#lib/thor/base.rb:809 + def built_option_names(target, opt = T.unsafe(nil), &block); end + + # Prints the class options per group. If an option does not belong to + # any group, it's printed as Class option. + # + # pkg:gem/thor#lib/thor/base.rb:639 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # Get command scope member by name. + # + # pkg:gem/thor#lib/thor/base.rb:817 + def command_scope_member(name, options = T.unsafe(nil)); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # pkg:gem/thor#lib/thor/base.rb:783 + def create_command(meth); end + + # pkg:gem/thor#lib/thor/base.rb:785 + def create_task(meth); end + + # SIGNATURE: The hook invoked by start. + # + # pkg:gem/thor#lib/thor/base.rb:793 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:709 + def find_and_refresh_command(name); end + + # pkg:gem/thor#lib/thor/base.rb:718 + def find_and_refresh_task(name); end + + # Retrieves a value from superclass. If it reaches the baseclass, + # returns default. + # + # pkg:gem/thor#lib/thor/base.rb:750 + def from_superclass(method, default = T.unsafe(nil)); end + + # Every time someone inherits from a Thor class, register the klass + # and file into baseclass. + # + # pkg:gem/thor#lib/thor/base.rb:722 + def inherited(klass); end + + # SIGNATURE: Defines behavior when the initialize method is added to the + # class. + # + # pkg:gem/thor#lib/thor/base.rb:789 + def initialize_added; end + + # Raises an error if the word given is a Thor reserved word. + # + # pkg:gem/thor#lib/thor/base.rb:678 + 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. + # + # pkg:gem/thor#lib/thor/base.rb:730 + def method_added(meth); end + + # Receives a set of options and print them. + # + # pkg:gem/thor#lib/thor/base.rb:657 + def print_options(shell, options, group_name = T.unsafe(nil)); end + + # Register a relation of options for target(method_option/class_option) + # by args and block. + # + # pkg:gem/thor#lib/thor/base.rb:799 + def register_options_relation_for(target, relation, *args, &block); end +end + +# pkg:gem/thor#lib/thor/command.rb:2 +class Thor::Command < ::Struct + # pkg:gem/thor#lib/thor/command.rb:5 + def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end + + # Returns the formatted usage by injecting given required arguments + # and required options into the given usage. + # + # pkg:gem/thor#lib/thor/command.rb:42 + def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/command.rb:15 + def hidden?; end + + # pkg:gem/thor#lib/thor/command.rb:70 + def method_at_least_one_option_names; end + + # pkg:gem/thor#lib/thor/command.rb:66 + def method_exclusive_option_names; end + + # By default, a command invokes a method in the thor class. You can change this + # implementation to create custom commands. + # + # pkg:gem/thor#lib/thor/command.rb:21 + def run(instance, args = T.unsafe(nil)); end + + protected + + # pkg:gem/thor#lib/thor/command.rb:114 + def handle_argument_error?(instance, error, caller); end + + # pkg:gem/thor#lib/thor/command.rb:121 + def handle_no_method_error?(instance, error, caller); end + + # pkg:gem/thor#lib/thor/command.rb:104 + def local_method?(instance, name); end + + # pkg:gem/thor#lib/thor/command.rb:87 + def not_debugging?(instance); end + + # pkg:gem/thor#lib/thor/command.rb:100 + def private_method?(instance); end + + # Given a target, checks if this class name is a public method. + # + # pkg:gem/thor#lib/thor/command.rb:96 + def public_method?(instance); end + + # Add usage with required arguments + # + # pkg:gem/thor#lib/thor/command.rb:77 + def required_arguments_for(klass, usage); end + + # pkg:gem/thor#lib/thor/command.rb:91 + def required_options; end + + # pkg:gem/thor#lib/thor/command.rb:109 + def sans_backtrace(backtrace, caller); end + + private + + # pkg:gem/thor#lib/thor/command.rb:9 + def initialize_copy(other); end +end + +# pkg:gem/thor#lib/thor/command.rb:3 +Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/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 +# +# pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:11 +class Thor::CoreExt::HashWithIndifferentAccess < ::Hash + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:12 + def initialize(hash = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:19 + def [](key); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:23 + def []=(key, value); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:27 + def delete(key); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:31 + def except(*keys); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:37 + def fetch(key, *args); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:45 + def key?(key); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:53 + def merge(other); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:57 + def merge!(other); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:72 + def replace(other_hash); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:64 + def reverse_merge(other); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:68 + def reverse_merge!(other_hash); end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:41 + def slice(*keys); end + + # Convert to a Hash with String keys. + # + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:77 + def to_hash; end + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:49 + def values_at(*indices); end + + protected + + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:83 + def convert_key(key); end + + # Magic predicates. For instance: + # + # options.force? # => !!options['force'] + # options.shebang # => "/usr/lib/local/ruby" + # options.test_framework?(:rspec) # => options[:test_framework] == :rspec + # + # pkg:gem/thor#lib/thor/core_ext/hash_with_indifferent_access.rb:93 + def method_missing(method, *args); end +end + +# pkg:gem/thor#lib/thor/error.rb:3 +module Thor::Correctable + # pkg:gem/thor#lib/thor/error.rb:8 + def corrections; end + + # pkg:gem/thor#lib/thor/error.rb:4 + def to_s; end +end + +# A dynamic command that handles method missing scenarios. +# +# pkg:gem/thor#lib/thor/command.rb:137 +class Thor::DynamicCommand < ::Thor::Command + # pkg:gem/thor#lib/thor/command.rb:138 + def initialize(name, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/command.rb:142 + def run(instance, args = T.unsafe(nil)); end +end + +# pkg:gem/thor#lib/thor/command.rb:150 +Thor::DynamicTask = Thor::DynamicCommand + +# Thor::Error is raised when it's caused by wrong usage of thor classes. Those +# errors have their backtrace suppressed and are nicely shown to the user. +# +# Errors that are caused by the developer, like declaring a method which +# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we +# ensure that developer errors are shown with full backtrace. +# +# pkg:gem/thor#lib/thor/error.rb:20 +class Thor::Error < ::StandardError; end + +# pkg:gem/thor#lib/thor/error.rb:101 +class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end + +# Thor has a special class called Thor::Group. The main difference to Thor class +# is that it invokes all commands at once. It also include some methods that allows +# invocations to be done at the class method, which are not available to Thor +# commands. +# +# pkg:gem/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. + # + # pkg:gem/thor#lib/thor/group.rb:276 + def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end + + class << self + # Overwrite class options help to allow invoked generators options to be + # shown recursively when invoking a generator. + # + # pkg:gem/thor#lib/thor/group.rb:161 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # pkg:gem/thor#lib/thor/group.rb:221 + def command_exists?(command_name); end + + # The description for this Thor::Group. If none is provided, but a source root + # exists, tries to find the USAGE one folder above it, otherwise searches + # in the superclass. + # + # ==== Parameters + # description<String>:: The description for this Thor::Group. + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/group.rb:172 + def get_options_from_invocations(group_options, base_options); end + + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/group.rb:29 + def help(shell); end + + # Stores invocation blocks used on invoke_from_option. + # + # pkg:gem/thor#lib/thor/group.rb:45 + def invocation_blocks; end + + # Stores invocations for this class merging with superclass values. + # + # pkg:gem/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. + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/group.rb:110 + def invoke_from_option(*names, &block); end + + # Returns commands ready to be printed. + # + # pkg:gem/thor#lib/thor/group.rb:199 + def printable_commands(*_arg0); end + + # pkg:gem/thor#lib/thor/group.rb:205 + def printable_tasks(*_arg0); end + + # Remove a previously added invocation. + # + # ==== Examples + # + # remove_invocation :test_framework + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/group.rb:249 + def banner; end + + # pkg:gem/thor#lib/thor/group.rb:259 + def baseclass; end + + # pkg:gem/thor#lib/thor/group.rb:263 + def create_command(meth); end + + # pkg:gem/thor#lib/thor/group.rb:267 + def create_task(meth); end + + # The method responsible for dispatching given the args. + # + # pkg:gem/thor#lib/thor/group.rb:228 + def dispatch(command, given_args, given_opts, config); end + + # Represents the whole class as a command. + # + # pkg:gem/thor#lib/thor/group.rb:254 + def self_command; end + + # pkg:gem/thor#lib/thor/group.rb:257 + def self_task; end + end +end + +# Shortcuts for help and tree commands. +# +# pkg:gem/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. +# +# pkg:gem/thor#lib/thor/command.rb:129 +class Thor::HiddenCommand < ::Thor::Command + # pkg:gem/thor#lib/thor/command.rb:130 + def hidden?; end +end + +# pkg:gem/thor#lib/thor/command.rb:134 +Thor::HiddenTask = Thor::HiddenCommand + +# pkg:gem/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. + # + # pkg:gem/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 + # + # pkg:gem/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 + # + # pkg:gem/thor#lib/thor/invocation.rb:102 + def invoke(name = T.unsafe(nil), *args); end + + # Invoke all commands for the current instance. + # + # pkg:gem/thor#lib/thor/invocation.rb:133 + def invoke_all; end + + # Invoke the given command if the given args. + # + # pkg:gem/thor#lib/thor/invocation.rb:122 + def invoke_command(command, *args); end + + # pkg:gem/thor#lib/thor/invocation.rb:130 + def invoke_task(command, *args); end + + # Invokes using shell padding. + # + # pkg:gem/thor#lib/thor/invocation.rb:138 + def invoke_with_padding(*args); end + + protected + + # Initialize klass using values stored in the @_initializer. + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/invocation.rb:153 + def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/invocation.rb:163 + def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end + + # Configuration values that are shared between invocations. + # + # pkg:gem/thor#lib/thor/invocation.rb:145 + def _shared_configuration; end + + class << self + # pkg:gem/thor#lib/thor/invocation.rb:3 + def included(base); end + end +end + +# pkg:gem/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). + # + # pkg:gem/thor#lib/thor/invocation.rb:12 + def prepare_for_invocation(key, name); end +end + +# Raised when a command was found, but not invoked properly. +# +# pkg:gem/thor#lib/thor/error.rb:62 +class Thor::InvocationError < ::Thor::Error; end + +# pkg:gem/thor#lib/thor/line_editor/basic.rb:2 +module Thor::LineEditor + class << self + # pkg:gem/thor#lib/thor/line_editor.rb:10 + def best_available; end + + # pkg:gem/thor#lib/thor/line_editor.rb:6 + def readline(prompt, options = T.unsafe(nil)); end + end +end + +# pkg:gem/thor#lib/thor/line_editor/basic.rb:3 +class Thor::LineEditor::Basic + # pkg:gem/thor#lib/thor/line_editor/basic.rb:10 + def initialize(prompt, options); end + + # pkg:gem/thor#lib/thor/line_editor/basic.rb:4 + def options; end + + # pkg:gem/thor#lib/thor/line_editor/basic.rb:4 + def prompt; end + + # pkg:gem/thor#lib/thor/line_editor/basic.rb:15 + def readline; end + + private + + # pkg:gem/thor#lib/thor/line_editor/basic.rb:32 + def echo?; end + + # pkg:gem/thor#lib/thor/line_editor/basic.rb:22 + def get_input; end + + class << self + # pkg:gem/thor#lib/thor/line_editor/basic.rb:6 + def available?; end + end +end + +# pkg:gem/thor#lib/thor/line_editor/readline.rb:3 +class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic + # pkg:gem/thor#lib/thor/line_editor/readline.rb:13 + def readline; end + + private + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:28 + def add_to_history?; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:42 + def completion_options; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:32 + def completion_proc; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:46 + def use_path_completion?; end + + class << self + # pkg:gem/thor#lib/thor/line_editor/readline.rb:4 + def available?; end + end +end + +# pkg:gem/thor#lib/thor/line_editor/readline.rb:50 +class Thor::LineEditor::Readline::PathCompletion + # pkg:gem/thor#lib/thor/line_editor/readline.rb:54 + def initialize(text); end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:58 + def matches; end + + private + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:68 + def absolute_matches; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:82 + def base_path; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:78 + def glob_pattern; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:64 + def relative_matches; end + + # pkg:gem/thor#lib/thor/line_editor/readline.rb:51 + def text; end +end + +# pkg:gem/thor#lib/thor/error.rb:98 +class Thor::MalformattedArgumentError < ::Thor::InvocationError; end + +# pkg:gem/thor#lib/thor/nested_context.rb:2 +class Thor::NestedContext + # pkg:gem/thor#lib/thor/nested_context.rb:3 + def initialize; end + + # pkg:gem/thor#lib/thor/nested_context.rb:7 + def enter; end + + # pkg:gem/thor#lib/thor/nested_context.rb:15 + def entered?; end + + private + + # pkg:gem/thor#lib/thor/nested_context.rb:25 + def pop; end + + # pkg:gem/thor#lib/thor/nested_context.rb:21 + def push; end +end + +# pkg:gem/thor#lib/thor/parser/option.rb:2 +class Thor::Option < ::Thor::Argument + # pkg:gem/thor#lib/thor/parser/option.rb:7 + def initialize(name, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/parser/option.rb:3 + def aliases; end + + # pkg:gem/thor#lib/thor/parser/option.rb:99 + def aliases_for_usage; end + + # pkg:gem/thor#lib/thor/parser/option.rb:117 + def array?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:117 + def boolean?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:3 + def group; end + + # pkg:gem/thor#lib/thor/parser/option.rb:117 + def hash?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:3 + def hide; end + + # pkg:gem/thor#lib/thor/parser/option.rb:79 + def human_name; end + + # pkg:gem/thor#lib/thor/parser/option.rb:3 + def lazy_default; end + + # pkg:gem/thor#lib/thor/parser/option.rb:117 + def numeric?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:3 + def repeatable; end + + # pkg:gem/thor#lib/thor/parser/option.rb:107 + def show_default?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:117 + def string?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:75 + def switch_name; end + + # pkg:gem/thor#lib/thor/parser/option.rb:83 + def usage(padding = T.unsafe(nil)); end + + protected + + # pkg:gem/thor#lib/thor/parser/option.rb:168 + def dasherize(str); end + + # pkg:gem/thor#lib/thor/parser/option.rb:160 + def dasherized?; end + + # pkg:gem/thor#lib/thor/parser/option.rb:164 + def undasherize(str); end + + # pkg:gem/thor#lib/thor/parser/option.rb:126 + def validate!; end + + # pkg:gem/thor#lib/thor/parser/option.rb:131 + def validate_default_type!; end + + private + + # pkg:gem/thor#lib/thor/parser/option.rb:174 + def normalize_aliases(aliases); end + + class << self + # This parse quick options given as method_options. It makes several + # assumptions, but you can be more specific using the option method. + # + # parse :foo => "bar" + # #=> Option foo with default value bar + # + # parse [:foo, :baz] => "bar" + # #=> Option foo with default value bar and alias :baz + # + # parse :foo => :required + # #=> Required option foo without default value + # + # parse :foo => 2 + # #=> Option foo with default value 2 and type numeric + # + # parse :foo => :numeric + # #=> Option foo without default value and type numeric + # + # parse :foo => true + # #=> Option foo with default value true and type boolean + # + # The valid types are :boolean, :numeric, :hash, :array and :string. If none + # is given a default type is assumed. This default type accepts arguments as + # string (--foo=value) or booleans (just --foo). + # + # By default all options are optional, unless :required is given. + # + # pkg:gem/thor#lib/thor/parser/option.rb:45 + def parse(key, value); end + end +end + +# pkg:gem/thor#lib/thor/parser/option.rb:5 +Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/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. + # + # pkg:gem/thor#lib/thor/parser/options.rb:32 + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/parser/options.rb:156 + def check_at_least_one!; end + + # pkg:gem/thor#lib/thor/parser/options.rb:144 + def check_exclusive!; end + + # pkg:gem/thor#lib/thor/parser/options.rb:168 + def check_unknown!; end + + # pkg:gem/thor#lib/thor/parser/options.rb:89 + def parse(args); end + + # pkg:gem/thor#lib/thor/parser/options.rb:65 + def peek; end + + # pkg:gem/thor#lib/thor/parser/options.rb:61 + def remaining; end + + # pkg:gem/thor#lib/thor/parser/options.rb:79 + def shift; end + + # pkg:gem/thor#lib/thor/parser/options.rb:84 + def unshift(arg, is_value: T.unsafe(nil)); end + + protected + + # pkg:gem/thor#lib/thor/parser/options.rb:189 + def assign_result!(option, result); end + + # Check if the current value in peek is a registered switch. + # + # Two booleans are returned. The first is true if the current value + # starts with a hyphen; the second is true if it is a registered switch. + # + # pkg:gem/thor#lib/thor/parser/options.rb:203 + def current_is_switch?; end + + # pkg:gem/thor#lib/thor/parser/options.rb:215 + def current_is_switch_formatted?; end + + # pkg:gem/thor#lib/thor/parser/options.rb:225 + def current_is_value?; end + + # Option names changes to swith name or human name + # + # pkg:gem/thor#lib/thor/parser/options.rb:179 + def names_to_switch_names(names = T.unsafe(nil)); end + + # Check if the given argument is actually a shortcut. + # + # pkg:gem/thor#lib/thor/parser/options.rb:244 + def normalize_switch(arg); end + + # Parse boolean values which can be given as --foo=true or --foo for true values, or + # --foo=false, --no-foo or --skip-foo for false values. + # + # pkg:gem/thor#lib/thor/parser/options.rb:256 + def parse_boolean(switch); end + + # Parse the value at the peek analyzing if it requires an input or not. + # + # pkg:gem/thor#lib/thor/parser/options.rb:274 + def parse_peek(switch, option); end + + # pkg:gem/thor#lib/thor/parser/options.rb:248 + def parsing_options?; end + + # pkg:gem/thor#lib/thor/parser/options.rb:230 + def switch?(arg); end + + # pkg:gem/thor#lib/thor/parser/options.rb:234 + def switch_option(arg); end + + class << self + # Receives a hash and makes it switches. + # + # pkg:gem/thor#lib/thor/parser/options.rb:11 + def to_switches(options); end + end +end + +# pkg:gem/thor#lib/thor/parser/options.rb:5 +Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/thor#lib/thor/parser/options.rb:3 +Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/thor#lib/thor/parser/options.rb:8 +Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) + +# Allow either -x -v or -xv style for single char args +# +# pkg:gem/thor#lib/thor/parser/options.rb:7 +Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/thor#lib/thor/parser/options.rb:4 +Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/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 +# +# pkg:gem/thor#lib/thor/rake_compat.rb:20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # pkg:gem/thor#lib/thor/rake_compat.rb:27 + def included(base); end + + # pkg:gem/thor#lib/thor/rake_compat.rb:23 + def rake_classes; end + end +end + +# pkg:gem/thor#lib/thor/error.rb:95 +class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end + +# pkg:gem/thor#lib/thor/util.rb:4 +module Thor::Sandbox; end + +# pkg:gem/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 + # + # pkg:gem/thor#lib/thor/shell.rb:44 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def ask(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def error(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def file_collision(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def no?(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def print_in_columns(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def print_table(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def print_wrapped(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def say(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def say_error(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def say_status(*args, &block); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + 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. + # + # pkg:gem/thor#lib/thor/shell.rb:52 + def shell; end + + # Holds the shell for the given Thor instance. If no shell is given, + # it gets a default shell from Thor::Base.shell. + # + # pkg:gem/thor#lib/thor/shell.rb:25 + def shell=(_arg0); end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def terminal_width(*args, &block); end + + # Yields the given block with padding. + # + # pkg:gem/thor#lib/thor/shell.rb:66 + def with_padding; end + + # pkg:gem/thor#lib/thor/shell.rb:58 + def yes?(*args, &block); end + + protected + + # Allow shell to be shared between invocations. + # + # pkg:gem/thor#lib/thor/shell.rb:77 + def _shared_configuration; end +end + +# pkg:gem/thor#lib/thor/shell/basic.rb:7 +class Thor::Shell::Basic + # Initialize base, mute and padding to nil. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:13 + def initialize; end + + # Asks something to the user and receives a response. + # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # + # If asked to limit the correct responses, you can pass in an + # array of acceptable answers. If one of those is not supplied, + # they will be shown a message stating that one of those answers + # must be given and re-asked the question. + # + # If asking for sensitive information, the :echo option can be set + # to false to mask user input from $stdin. + # + # If the required input is a path, then set the path option to + # true. This will enable tab completion for file paths relative + # to the current working directory on systems that support + # Readline. + # + # ==== Example + # ask("What is your name?") + # + # ask("What is the planet furthest from the sun?", :default => "Neptune") + # + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # + # ask("What is your password?", :echo => false) + # + # ask("Where should the file be saved?", :path => true) + # + # pkg:gem/thor#lib/thor/shell/basic.rb:80 + def ask(statement, *args); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:8 + def base; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:8 + def base=(_arg0); end + + # Called if something goes wrong during the execution. This is used by Thor + # internally and should not be used inside your scripts. If something went + # wrong, you can always raise an exception. If you raise a Thor::Error, it + # will be rescued and wrapped in the method below. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:251 + def error(statement); end + + # Deals with file collision and returns true if the file should be + # overwritten and false otherwise. If a block is given, it uses the block + # response as the content for the diff. + # + # ==== Parameters + # destination<String>:: the destination file to solve conflicts + # block<Proc>:: an optional block that returns the value to be used in diff and merge + # + # pkg:gem/thor#lib/thor/shell/basic.rb:207 + def file_collision(destination); end + + # Sets the output padding while executing a block and resets it. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:43 + def indent(count = T.unsafe(nil)); end + + # Mute everything that's inside given block + # + # pkg:gem/thor#lib/thor/shell/basic.rb:22 + def mute; end + + # Check if base is muted + # + # pkg:gem/thor#lib/thor/shell/basic.rb:31 + def mute?; end + + # Asks the user a question and returns true if the user replies "n" or + # "no". + # + # pkg:gem/thor#lib/thor/shell/basic.rb:156 + def no?(statement, color = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:9 + def padding; end + + # Sets the output padding, not allowing less than zero values. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:37 + def padding=(value); end + + # Prints values in columns + # + # ==== Parameters + # Array[String, String, ...] + # + # pkg:gem/thor#lib/thor/shell/basic.rb:165 + 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. + # borders<Boolean>:: Adds ascii borders. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:180 + def print_table(array, options = T.unsafe(nil)); end + + # Prints a long string, word-wrapping the text to the current width of the + # terminal display. Ideal for printing heredocs. + # + # ==== Parameters + # String + # + # ==== Options + # indent<Integer>:: Indent each line of the printed paragraph by indent value. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:194 + def print_wrapped(message, options = T.unsafe(nil)); end + + # Say (print) something to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say("I know you knew that.") + # + # pkg:gem/thor#lib/thor/shell/basic.rb:98 + def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say (print) an error to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say_error("error: something went wrong") + # + # pkg:gem/thor#lib/thor/shell/basic.rb:115 + def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say a status with the given color and appends the message. Since this + # method is used frequently by actions, it allows nil or false to be given + # in log_status, avoiding the message from being shown. If a Symbol is + # given in log_status, it's used as the color. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:130 + def say_status(status, message, log_status = T.unsafe(nil)); end + + # Apply color to the given string with optional bold. Disabled in the + # Thor::Shell::Basic class. + # + # pkg:gem/thor#lib/thor/shell/basic.rb:258 + def set_color(string, *_arg1); end + + # Asks the user a question and returns true if the user replies "y" or + # "yes". + # + # pkg:gem/thor#lib/thor/shell/basic.rb:149 + def yes?(statement, color = T.unsafe(nil)); end + + protected + + # pkg:gem/thor#lib/thor/shell/basic.rb:360 + def answer_match(possibilities, answer, case_insensitive); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:347 + def ask_filtered(statement, color, options); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:330 + def ask_simply(statement, color, options); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:269 + def can_display_colors?; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:384 + def diff_tool; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:296 + def file_collision_help(block_given); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:286 + def is?(value); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:273 + def lookup_color(color); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:368 + def merge(destination, content); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:377 + def merge_tool; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:264 + def prepare_message(message, *color); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:322 + def quiet?; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:313 + def show_diff(destination, content); end + + # pkg:gem/thor#lib/thor/shell/basic.rb:282 + def stderr; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:278 + def stdout; end + + # pkg:gem/thor#lib/thor/shell/basic.rb:326 + def unix?; end +end + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# pkg:gem/thor#lib/thor/shell/color.rb:11 +class Thor::Shell::Color < ::Thor::Shell::Basic + include ::LCSDiff + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # Pass foreground, background and bold options to this method as + # symbols. + # + # Example: + # + # set_color "Hi!", :red, :on_white, :bold + # + # The available colors are: + # + # :bold + # :black + # :red + # :green + # :yellow + # :blue + # :magenta + # :cyan + # :white + # :on_black + # :on_red + # :on_green + # :on_yellow + # :on_blue + # :on_magenta + # :on_cyan + # :on_white + # + # pkg:gem/thor#lib/thor/shell/color.rb:84 + def set_color(string, *colors); end + + protected + + # pkg:gem/thor#lib/thor/shell/color.rb:112 + def are_colors_disabled?; end + + # pkg:gem/thor#lib/thor/shell/color.rb:108 + def are_colors_supported?; end + + # pkg:gem/thor#lib/thor/shell/color.rb:104 + def can_display_colors?; end +end + +# Set the terminal's foreground ANSI color to black. +# +# pkg:gem/thor#lib/thor/shell/color.rb:20 +Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to blue. +# +# pkg:gem/thor#lib/thor/shell/color.rb:28 +Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) + +# The start of an ANSI bold sequence. +# +# pkg:gem/thor#lib/thor/shell/color.rb:17 +Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# pkg:gem/thor#lib/thor/shell/color.rb:15 +Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to cyan. +# +# pkg:gem/thor#lib/thor/shell/color.rb:32 +Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to green. +# +# pkg:gem/thor#lib/thor/shell/color.rb:24 +Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to magenta. +# +# pkg:gem/thor#lib/thor/shell/color.rb:30 +Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to black. +# +# pkg:gem/thor#lib/thor/shell/color.rb:37 +Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to blue. +# +# pkg:gem/thor#lib/thor/shell/color.rb:45 +Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to cyan. +# +# pkg:gem/thor#lib/thor/shell/color.rb:49 +Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to green. +# +# pkg:gem/thor#lib/thor/shell/color.rb:41 +Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to magenta. +# +# pkg:gem/thor#lib/thor/shell/color.rb:47 +Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to red. +# +# pkg:gem/thor#lib/thor/shell/color.rb:39 +Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to white. +# +# pkg:gem/thor#lib/thor/shell/color.rb:51 +Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to yellow. +# +# pkg:gem/thor#lib/thor/shell/color.rb:43 +Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to red. +# +# pkg:gem/thor#lib/thor/shell/color.rb:22 +Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to white. +# +# pkg:gem/thor#lib/thor/shell/color.rb:34 +Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to yellow. +# +# pkg:gem/thor#lib/thor/shell/color.rb:26 +Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) + +# pkg:gem/thor#lib/thor/shell/column_printer.rb:5 +class Thor::Shell::ColumnPrinter + # pkg:gem/thor#lib/thor/shell/column_printer.rb:8 + def initialize(stdout, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/shell/column_printer.rb:6 + def options; end + + # pkg:gem/thor#lib/thor/shell/column_printer.rb:14 + def print(array); end + + # pkg:gem/thor#lib/thor/shell/column_printer.rb:6 + def stdout; end +end + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# pkg:gem/thor#lib/thor/shell/html.rb:9 +class Thor::Shell::HTML < ::Thor::Shell::Basic + include ::LCSDiff + + # Ask something to the user and receives a response. + # + # ==== Example + # ask("What is your name?") + # + # TODO: Implement #ask for Thor::Shell::HTML + # + # pkg:gem/thor#lib/thor/shell/html.rb:73 + def ask(statement, color = T.unsafe(nil)); end + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # pkg:gem/thor#lib/thor/shell/html.rb:54 + def set_color(string, *colors); end + + protected + + # pkg:gem/thor#lib/thor/shell/html.rb:79 + def can_display_colors?; end +end + +# Set the terminal's foreground HTML color to black. +# +# pkg:gem/thor#lib/thor/shell/html.rb:16 +Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to blue. +# +# pkg:gem/thor#lib/thor/shell/html.rb:24 +Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) + +# The start of an HTML bold sequence. +# +# pkg:gem/thor#lib/thor/shell/html.rb:13 +Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to cyan. +# +# pkg:gem/thor#lib/thor/shell/html.rb:28 +Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to green. +# +# pkg:gem/thor#lib/thor/shell/html.rb:20 +Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to magenta. +# +# pkg:gem/thor#lib/thor/shell/html.rb:26 +Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to black. +# +# pkg:gem/thor#lib/thor/shell/html.rb:33 +Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to blue. +# +# pkg:gem/thor#lib/thor/shell/html.rb:41 +Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to cyan. +# +# pkg:gem/thor#lib/thor/shell/html.rb:45 +Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to green. +# +# pkg:gem/thor#lib/thor/shell/html.rb:37 +Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to magenta. +# +# pkg:gem/thor#lib/thor/shell/html.rb:43 +Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to red. +# +# pkg:gem/thor#lib/thor/shell/html.rb:35 +Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to white. +# +# pkg:gem/thor#lib/thor/shell/html.rb:47 +Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to yellow. +# +# pkg:gem/thor#lib/thor/shell/html.rb:39 +Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to red. +# +# pkg:gem/thor#lib/thor/shell/html.rb:18 +Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to white. +# +# pkg:gem/thor#lib/thor/shell/html.rb:30 +Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to yellow. +# +# pkg:gem/thor#lib/thor/shell/html.rb:22 +Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) + +# pkg:gem/thor#lib/thor/shell.rb:24 +Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/thor#lib/thor/shell/table_printer.rb:6 +class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter + # pkg:gem/thor#lib/thor/shell/table_printer.rb:9 + def initialize(stdout, options = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:18 + def print(array); end + + private + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:72 + def format_cell(column, row_size, index); end + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:113 + def indentation; end + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:47 + def prepare(array); end + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:96 + def print_border_separator; end + + # pkg:gem/thor#lib/thor/shell/table_printer.rb:103 + def truncate(string); end +end + +# pkg:gem/thor#lib/thor/shell/table_printer.rb:7 +Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/thor#lib/thor/shell/terminal.rb:3 +module Thor::Shell::Terminal + class << self + # This code was copied from Rake, available under MIT-LICENSE + # Copyright (c) 2003, 2004 Jim Weirich + # + # pkg:gem/thor#lib/thor/shell/terminal.rb:9 + def terminal_width; end + + # pkg:gem/thor#lib/thor/shell/terminal.rb:20 + def unix?; end + + private + + # Calculate the dynamic width of the terminal + # + # pkg:gem/thor#lib/thor/shell/terminal.rb:27 + def dynamic_width; end + + # pkg:gem/thor#lib/thor/shell/terminal.rb:31 + def dynamic_width_stty; end + + # pkg:gem/thor#lib/thor/shell/terminal.rb:35 + def dynamic_width_tput; end + end +end + +# pkg:gem/thor#lib/thor/shell/terminal.rb:4 +Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/thor#lib/thor/shell/wrapped_printer.rb:6 +class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter + # pkg:gem/thor#lib/thor/shell/wrapped_printer.rb:7 + def print(message); end +end + +# pkg:gem/thor#lib/thor/base.rb:24 +Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) + +# Thor methods that should not be overwritten by the user. +# +# pkg:gem/thor#lib/thor/base.rb:21 +Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# pkg:gem/thor#lib/thor/base.rb:18 +Thor::TREE_MAPPINGS = T.let(T.unsafe(nil), Array) + +# pkg:gem/thor#lib/thor/command.rb:126 +Thor::Task = Thor::Command + +# Raised when a command was not found. +# +# pkg:gem/thor#lib/thor/error.rb:24 +class Thor::UndefinedCommandError < ::Thor::Error + include ::Thor::Correctable + + # pkg:gem/thor#lib/thor/error.rb:43 + def initialize(command, all_commands, namespace); end + + # pkg:gem/thor#lib/thor/error.rb:41 + def all_commands; end + + # pkg:gem/thor#lib/thor/error.rb:41 + def command; end +end + +# pkg:gem/thor#lib/thor/error.rb:25 +class Thor::UndefinedCommandError::SpellChecker + # pkg:gem/thor#lib/thor/error.rb:28 + def initialize(error); end + + # pkg:gem/thor#lib/thor/error.rb:32 + def corrections; end + + # pkg:gem/thor#lib/thor/error.rb:26 + def error; end + + # pkg:gem/thor#lib/thor/error.rb:36 + def spell_checker; end +end + +# pkg:gem/thor#lib/thor/error.rb:55 +Thor::UndefinedTaskError = Thor::UndefinedCommandError + +# pkg:gem/thor#lib/thor/error.rb:65 +class Thor::UnknownArgumentError < ::Thor::Error + include ::Thor::Correctable + + # pkg:gem/thor#lib/thor/error.rb:85 + def initialize(switches, unknown); end + + # pkg:gem/thor#lib/thor/error.rb:83 + def switches; end + + # pkg:gem/thor#lib/thor/error.rb:83 + def unknown; end +end + +# pkg:gem/thor#lib/thor/error.rb:66 +class Thor::UnknownArgumentError::SpellChecker + # pkg:gem/thor#lib/thor/error.rb:69 + def initialize(error); end + + # pkg:gem/thor#lib/thor/error.rb:73 + def corrections; end + + # pkg:gem/thor#lib/thor/error.rb:67 + def error; end + + # pkg:gem/thor#lib/thor/error.rb:78 + def spell_checker; end +end + +# This module holds several utilities: +# +# 1) Methods to convert thor namespaces to constants and vice-versa. +# +# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" +# +# 2) Loading thor files and sandboxing: +# +# Thor::Util.load_thorfile("~/.thor/foo") +# +# pkg:gem/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 + # + # pkg:gem/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 + # + # pkg:gem/thor#lib/thor/util.rb:264 + def escape_globs(path); end + + # Returns a string that has had any HTML characters escaped. + # + # ==== Examples + # + # Thor::Util.escape_html('<div>') # => "<div>" + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # pkg:gem/thor#lib/thor/util.rb:280 + def escape_html(string); end + + # Receives a namespace and search for it in the Thor::Base subclasses. + # + # ==== Parameters + # namespace<String>:: The namespace to search for. + # + # pkg:gem/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> + # + # pkg:gem/thor#lib/thor/util.rb:131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # pkg:gem/thor#lib/thor/util.rb:148 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # pkg:gem/thor#lib/thor/util.rb:213 + def globs_for(path); end + + # Receives a path and load the thor file in the path. The file is evaluated + # inside the sandbox to avoid namespacing conflicts. + # + # pkg:gem/thor#lib/thor/util.rb:153 + def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Receives a constant and converts it to a Thor namespace. Since Thor + # commands can be added to a sandbox, this method is also responsible for + # removing the sandbox namespace. + # + # This method should not be used in general because it's used to deal with + # older versions of Thor. On current versions, if you need to get the + # namespace from a class, just call namespace on it. + # + # ==== Parameters + # constant<Object>:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # pkg:gem/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] + # + # pkg:gem/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. + # + # pkg:gem/thor#lib/thor/util.rb:221 + def ruby_command; end + + # Receives a string and convert it to snake case. SnakeCase returns snake_case. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # pkg:gem/thor#lib/thor/util.rb:90 + def snake_case(str); end + + # Returns the thor classes declared inside the given class. + # + # pkg:gem/thor#lib/thor/util.rb:74 + def thor_classes_in(klass); end + + # Returns the root where thor files are located, depending on the OS. + # + # pkg:gem/thor#lib/thor/util.rb:192 + def thor_root; end + + # Returns the files in the thor root. On Windows thor_root will be something + # like this: + # + # C:\Documents and Settings\james\.thor + # + # If we don't #gsub the \ character, Dir.glob will fail. + # + # pkg:gem/thor#lib/thor/util.rb:203 + def thor_root_glob; end + + # pkg:gem/thor#lib/thor/util.rb:168 + def user_home; end + end +end diff --git a/sorbet/rbi/gems/tsort@0.2.0.rbi b/sorbet/rbi/gems/tsort@0.2.0.rbi new file mode 100644 index 00000000..a60ab546 --- /dev/null +++ b/sorbet/rbi/gems/tsort@0.2.0.rbi @@ -0,0 +1,389 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tsort` gem. +# Please instead update this file by running `bin/tapioca gem tsort`. + + +# TSort implements topological sorting using Tarjan's algorithm for +# strongly connected components. +# +# TSort is designed to be able to be used with any object which can be +# interpreted as a directed graph. +# +# TSort requires two methods to interpret an object as a graph, +# tsort_each_node and tsort_each_child. +# +# * tsort_each_node is used to iterate for all nodes over a graph. +# * tsort_each_child is used to iterate for child nodes of a given node. +# +# The equality of nodes are defined by eql? and hash since +# TSort uses Hash internally. +# +# == A Simple Example +# +# The following example demonstrates how to mix the TSort module into an +# existing class (in this case, Hash). Here, we're treating each key in +# the hash as a node in the graph, and so we simply alias the required +# #tsort_each_node method to Hash's #each_key method. For each key in the +# hash, the associated value is an array of the node's child nodes. This +# choice in turn leads to our implementation of the required #tsort_each_child +# method, which fetches the array of child nodes and then iterates over that +# array using the user-supplied block. +# +# require 'tsort' +# +# class Hash +# include TSort +# alias tsort_each_node each_key +# def tsort_each_child(node, &block) +# fetch(node).each(&block) +# end +# end +# +# {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort +# #=> [3, 2, 1, 4] +# +# {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components +# #=> [[4], [2, 3], [1]] +# +# == A More Realistic Example +# +# A very simple `make' like tool can be implemented as follows: +# +# require 'tsort' +# +# class Make +# def initialize +# @dep = {} +# @dep.default = [] +# end +# +# def rule(outputs, inputs=[], &block) +# triple = [outputs, inputs, block] +# outputs.each {|f| @dep[f] = [triple]} +# @dep[triple] = inputs +# end +# +# def build(target) +# each_strongly_connected_component_from(target) {|ns| +# if ns.length != 1 +# fs = ns.delete_if {|n| Array === n} +# raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}") +# end +# n = ns.first +# if Array === n +# outputs, inputs, block = n +# inputs_time = inputs.map {|f| File.mtime f}.max +# begin +# outputs_time = outputs.map {|f| File.mtime f}.min +# rescue Errno::ENOENT +# outputs_time = nil +# end +# if outputs_time == nil || +# inputs_time != nil && outputs_time <= inputs_time +# sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i +# block.call +# end +# end +# } +# end +# +# def tsort_each_child(node, &block) +# @dep[node].each(&block) +# end +# include TSort +# end +# +# def command(arg) +# print arg, "\n" +# system arg +# end +# +# m = Make.new +# m.rule(%w[t1]) { command 'date > t1' } +# m.rule(%w[t2]) { command 'date > t2' } +# m.rule(%w[t3]) { command 'date > t3' } +# m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 > t4' } +# m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 > t5' } +# m.build('t5') +# +# == Bugs +# +# * 'tsort.rb' is wrong name because this library uses +# Tarjan's algorithm for strongly connected components. +# Although 'strongly_connected_components.rb' is correct but too long. +# +# == References +# +# R. E. Tarjan, "Depth First Search and Linear Graph Algorithms", +# <em>SIAM Journal on Computing</em>, Vol. 1, No. 2, pp. 146-160, June 1972. +# +# pkg:gem/tsort#lib/tsort.rb:124 +module TSort + # The iterator version of the #strongly_connected_components method. + # <tt><em>obj</em>.each_strongly_connected_component</tt> is similar to + # <tt><em>obj</em>.strongly_connected_components.each</tt>, but + # modification of _obj_ during the iteration may lead to unexpected results. + # + # #each_strongly_connected_component returns +nil+. + # + # class G + # include TSort + # def initialize(g) + # @g = g + # end + # def tsort_each_child(n, &b) @g[n].each(&b) end + # def tsort_each_node(&b) @g.each_key(&b) end + # end + # + # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) + # graph.each_strongly_connected_component {|scc| p scc } + # #=> [4] + # # [2] + # # [3] + # # [1] + # + # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) + # graph.each_strongly_connected_component {|scc| p scc } + # #=> [4] + # # [2, 3] + # # [1] + # + # pkg:gem/tsort#lib/tsort.rb:316 + def each_strongly_connected_component(&block); end + + # Iterates over strongly connected component in the subgraph reachable from + # _node_. + # + # Return value is unspecified. + # + # #each_strongly_connected_component_from doesn't call #tsort_each_node. + # + # class G + # include TSort + # def initialize(g) + # @g = g + # end + # def tsort_each_child(n, &b) @g[n].each(&b) end + # def tsort_each_node(&b) @g.each_key(&b) end + # end + # + # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) + # graph.each_strongly_connected_component_from(2) {|scc| p scc } + # #=> [4] + # # [2] + # + # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) + # graph.each_strongly_connected_component_from(2) {|scc| p scc } + # #=> [4] + # # [2, 3] + # + # pkg:gem/tsort#lib/tsort.rb:386 + def each_strongly_connected_component_from(node, id_map = T.unsafe(nil), stack = T.unsafe(nil), &block); end + + # Returns strongly connected components as an array of arrays of nodes. + # The array is sorted from children to parents. + # Each elements of the array represents a strongly connected component. + # + # class G + # include TSort + # def initialize(g) + # @g = g + # end + # def tsort_each_child(n, &b) @g[n].each(&b) end + # def tsort_each_node(&b) @g.each_key(&b) end + # end + # + # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) + # p graph.strongly_connected_components #=> [[4], [2], [3], [1]] + # + # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) + # p graph.strongly_connected_components #=> [[4], [2, 3], [1]] + # + # pkg:gem/tsort#lib/tsort.rb:257 + def strongly_connected_components; end + + # Returns a topologically sorted array of nodes. + # The array is sorted from children to parents, i.e. + # the first element has no child and the last node has no parent. + # + # If there is a cycle, TSort::Cyclic is raised. + # + # class G + # include TSort + # def initialize(g) + # @g = g + # end + # def tsort_each_child(n, &b) @g[n].each(&b) end + # def tsort_each_node(&b) @g.each_key(&b) end + # end + # + # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) + # p graph.tsort #=> [4, 2, 3, 1] + # + # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) + # p graph.tsort # raises TSort::Cyclic + # + # pkg:gem/tsort#lib/tsort.rb:152 + def tsort; end + + # The iterator version of the #tsort method. + # <tt><em>obj</em>.tsort_each</tt> is similar to <tt><em>obj</em>.tsort.each</tt>, but + # modification of _obj_ during the iteration may lead to unexpected results. + # + # #tsort_each returns +nil+. + # If there is a cycle, TSort::Cyclic is raised. + # + # class G + # include TSort + # def initialize(g) + # @g = g + # end + # def tsort_each_child(n, &b) @g[n].each(&b) end + # def tsort_each_node(&b) @g.each_key(&b) end + # end + # + # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) + # graph.tsort_each {|n| p n } + # #=> 4 + # # 2 + # # 3 + # # 1 + # + # pkg:gem/tsort#lib/tsort.rb:205 + def tsort_each(&block); end + + # Should be implemented by a extended class. + # + # #tsort_each_child is used to iterate for child nodes of _node_. + # + # pkg:gem/tsort#lib/tsort.rb:452 + def tsort_each_child(node); end + + # Should be implemented by a extended class. + # + # #tsort_each_node is used to iterate for all nodes over a graph. + # + # pkg:gem/tsort#lib/tsort.rb:444 + def tsort_each_node; end + + class << self + # The iterator version of the TSort.strongly_connected_components method. + # + # The graph is represented by _each_node_ and _each_child_. + # _each_node_ should have +call+ method which yields for each node in the graph. + # _each_child_ should have +call+ method which takes a node argument and yields for each child node. + # + # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc } + # #=> [4] + # # [2] + # # [3] + # # [1] + # + # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc } + # #=> [4] + # # [2, 3] + # # [1] + # + # pkg:gem/tsort#lib/tsort.rb:345 + def each_strongly_connected_component(each_node, each_child); end + + # Iterates over strongly connected components in a graph. + # The graph is represented by _node_ and _each_child_. + # + # _node_ is the first node. + # _each_child_ should have +call+ method which takes a node argument + # and yields for each child node. + # + # Return value is unspecified. + # + # #TSort.each_strongly_connected_component_from is a class method and + # it doesn't need a class to represent a graph which includes TSort. + # + # graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} + # each_child = lambda {|n, &b| graph[n].each(&b) } + # TSort.each_strongly_connected_component_from(1, each_child) {|scc| + # p scc + # } + # #=> [4] + # # [2, 3] + # # [1] + # + # pkg:gem/tsort#lib/tsort.rb:411 + def each_strongly_connected_component_from(node, each_child, id_map = T.unsafe(nil), stack = T.unsafe(nil)); end + + # Returns strongly connected components as an array of arrays of nodes. + # The array is sorted from children to parents. + # Each elements of the array represents a strongly connected component. + # + # The graph is represented by _each_node_ and _each_child_. + # _each_node_ should have +call+ method which yields for each node in the graph. + # _each_child_ should have +call+ method which takes a node argument and yields for each child node. + # + # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # p TSort.strongly_connected_components(each_node, each_child) + # #=> [[4], [2], [3], [1]] + # + # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # p TSort.strongly_connected_components(each_node, each_child) + # #=> [[4], [2, 3], [1]] + # + # pkg:gem/tsort#lib/tsort.rb:283 + def strongly_connected_components(each_node, each_child); end + + # Returns a topologically sorted array of nodes. + # The array is sorted from children to parents, i.e. + # the first element has no child and the last node has no parent. + # + # The graph is represented by _each_node_ and _each_child_. + # _each_node_ should have +call+ method which yields for each node in the graph. + # _each_child_ should have +call+ method which takes a node argument and yields for each child node. + # + # If there is a cycle, TSort::Cyclic is raised. + # + # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # p TSort.tsort(each_node, each_child) #=> [4, 2, 3, 1] + # + # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # p TSort.tsort(each_node, each_child) # raises TSort::Cyclic + # + # pkg:gem/tsort#lib/tsort.rb:178 + def tsort(each_node, each_child); end + + # The iterator version of the TSort.tsort method. + # + # The graph is represented by _each_node_ and _each_child_. + # _each_node_ should have +call+ method which yields for each node in the graph. + # _each_child_ should have +call+ method which takes a node argument and yields for each child node. + # + # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} + # each_node = lambda {|&b| g.each_key(&b) } + # each_child = lambda {|n, &b| g[n].each(&b) } + # TSort.tsort_each(each_node, each_child) {|n| p n } + # #=> 4 + # # 2 + # # 3 + # # 1 + # + # pkg:gem/tsort#lib/tsort.rb:226 + def tsort_each(each_node, each_child); end + end +end + +# pkg:gem/tsort#lib/tsort.rb:126 +TSort::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi deleted file mode 100644 index 1974cb0f..00000000 --- a/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +++ /dev/null @@ -1,26 +0,0 @@ -# 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`. - -module Unicode; end - -class Unicode::DisplayWidth - def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end - - def get_config(**kwargs); end - def of(string, **kwargs); end - - class << self - def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end - def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end - end -end - -Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) -Unicode::DisplayWidth::DEPTHS = T.let(T.unsafe(nil), Array) -Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) -Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) -Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) -Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi b/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi new file mode 100644 index 00000000..66f95dff --- /dev/null +++ b/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# 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-emoji@4.2.0.rbi b/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi new file mode 100644 index 00000000..66e786d4 --- /dev/null +++ b/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-emoji` gem. +# Please instead update this file by running `bin/tapioca gem unicode-emoji`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/unparser@0.6.3.rbi b/sorbet/rbi/gems/unparser@0.6.3.rbi deleted file mode 100644 index 048ce6fe..00000000 --- a/sorbet/rbi/gems/unparser@0.6.3.rbi +++ /dev/null @@ -1,1816 +0,0 @@ -# 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`. - -module Unparser - class << self - def buffer(source, identification = T.unsafe(nil)); end - def parse(source); end - def parse_either(source); end - def parse_with_comments(source); end - def parser; end - def unparse(node, comment_array = T.unsafe(nil)); end - def unparse_either(node); end - def unparse_validate(node, comment_array = T.unsafe(nil)); end - end -end - -module Unparser::AST - class << self - def local_variable_assignments(node); end - def local_variable_reads(node); end - def not_close_scope?(node); end - def not_reset_scope?(node); end - end -end - -Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set) -Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array) - -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 - - def each(&block); end - def type(type); end - def types(types); end - - class << self - def new(node, controller = T.unsafe(nil)); end - - private - - def set(enumerable); end - def type(node, type); end - end -end - -Unparser::AST::FIRST_CHILD = T.let(T.unsafe(nil), Proc) -Unparser::AST::INHERIT_NODES = T.let(T.unsafe(nil), Array) - -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 - - def initialize(node); end - - def first_assignment?(node); end - def first_assignment_in?(left, right); end - def local_variable_defined_for_node?(node, name); end - - private - - def match(needle); end -end - -class Unparser::AST::LocalVariableScopeEnumerator - include ::Enumerable - - def initialize; end - - def each(node, &block); end - - private - - def current; end - def define(name); end - def enter(node); end - def leave(node); end - def pop; end - def push_inherit; end - def push_reset; end - def visit(node, &block); end - - class << self - def each(node, &block); end - end -end - -Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array) -Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc) - -class Unparser::AST::Walker - include ::Unparser::Equalizer::Methods - - def call(node); end - - class << self - def call(node, controller = T.unsafe(nil), &block); end - end -end - -module Unparser::AbstractType - mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - private - - def create_new_method(abstract_class); end - def included(descendant); end - end -end - -module Unparser::AbstractType::AbstractMethodDeclarations - def abstract_method(*names); end - def abstract_singleton_method(*names); end - - private - - def create_abstract_instance_method(name); end - def create_abstract_singleton_method(name); end -end - -module Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - - mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods - mixes_in_class_methods ::Unparser::Adamantium::ClassMethods - - class << self - private - - def included(descendant); end - end -end - -module Unparser::Adamantium::ClassMethods - def new(*_arg0); end -end - -module Unparser::Adamantium::InstanceMethods - def dup; end - def freeze; end - - private - - def memoized_method_cache; end -end - -class Unparser::Adamantium::Memory - def initialize(values); end - - def fetch(name); end -end - -class Unparser::Adamantium::MethodBuilder - def initialize(descendant, method_name); end - - def call; end - - private - - def assert_arity(arity); end - def create_memoized_method; end - def remove_original_method; end - def set_method_visibility; end - def visibility; end -end - -class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError - def initialize(descendant, method); end -end - -class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError - def initialize(descendant, method, arity); end -end - -module Unparser::Adamantium::ModuleMethods - def memoize(*methods); end - def memoized?(method_name); end - def unmemoized_instance_method(method_name); end - - private - - def memoize_method(method_name); end - def memoized_methods; end -end - -class Unparser::Anima < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - def initialize(*names); end - - def add(*names); end - def attribute_names(&block); end - def attributes; end - def attributes_hash(object); end - def initialize_instance(object, attribute_hash); end - def remove(*names); end - - private - - def assert_known_attributes(klass, attribute_hash); end - def included(descendant); end - def new(attributes); end -end - -class Unparser::Anima::Attribute - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - def initialize(name); end - - def get(object); end - def instance_variable_name; end - def load(object, attributes); end - def name; end - def set(object, value); end -end - -class Unparser::Anima::Error < ::RuntimeError - def initialize(klass, missing, unknown); end -end - -Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String) - -module Unparser::Anima::InstanceMethods - def initialize(attributes); end - - def to_h; end - def with(attributes); end -end - -class Unparser::Buffer - def initialize; end - - def append(string); end - def append_without_prefix(string); end - def capture_content; end - def content; end - def fresh_line?; end - def indent; end - def nl; end - def root_indent; end - def unindent; end - def write(fragment); end - - private - - def prefix; end -end - -Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String) -Unparser::Buffer::NL = T.let(T.unsafe(nil), String) - -class Unparser::Builder < ::Parser::Builders::Default - def initialize; end -end - -class Unparser::CLI - def initialize(arguments); end - - def add_options(builder); end - def exit_status; end - - private - - def effective_targets; end - def process_target(target); end - def targets(file_name); end - - class << self - def run(*arguments); end - end -end - -Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer) -Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer) - -class Unparser::CLI::Target - include ::Unparser::AbstractType - extend ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - def new(*args, &block); end - end -end - -class Unparser::CLI::Target::Path < ::Unparser::CLI::Target - include ::Unparser::Equalizer::Methods - - def literal_validation; end - def validation; end -end - -class Unparser::CLI::Target::String - include ::Unparser::Equalizer::Methods - - def literal_validation; end - def validation; end -end - -class Unparser::Color - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - def format(text); end -end - -Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color) -Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped) -Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color) - -class Unparser::Comments - def initialize(comments); end - - def consume(node, source_part = T.unsafe(nil)); end - def source_range(*arguments); end - def take_all; end - def take_before(node, source_part); end - def take_eol_comments; end - - private - - def take_up_to_line(line); end - def take_while; end - def unshift_documents(comments); end - - class << self - def source_range(node, part); end - end -end - -class Unparser::Concord < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - def initialize(*names); end - - def names; end - - private - - def define_equalizer; end - def define_initialize; end - def define_readers; end - def instance_variable_names; end -end - -Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer) - -class Unparser::Concord::Public < ::Unparser::Concord - def included(descendant); end -end - -module Unparser::Constants; end -Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set) -Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set) -Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String) -Unparser::Constants::K_AND = T.let(T.unsafe(nil), String) -Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String) -Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String) -Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String) -Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String) -Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String) -Unparser::Constants::K_DO = T.let(T.unsafe(nil), String) -Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String) -Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String) -Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String) -Unparser::Constants::K_END = T.let(T.unsafe(nil), String) -Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String) -Unparser::Constants::K_IF = T.let(T.unsafe(nil), String) -Unparser::Constants::K_IN = T.let(T.unsafe(nil), String) -Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String) -Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String) -Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String) -Unparser::Constants::K_OR = T.let(T.unsafe(nil), String) -Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String) -Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String) -Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String) -Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String) -Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String) -Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String) -Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String) -Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String) -Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String) -Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String) -Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String) -Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String) -Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set) - -module Unparser::DSL - private - - def children(*names); end - def define_child(name, index); end - def define_group(name, range); end - def define_remaining_children(names); end -end - -class Unparser::Diff - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - def colorized_diff(&block); end - def diff(&block); end - - private - - def diffs; end - def hunks; end - def max_length; end - def minimized_hunk; end - - class << self - def build(old, new); end - - private - - def colorize_line(line); end - def lines(source); end - end -end - -Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String) -Unparser::Diff::DELETION = T.let(T.unsafe(nil), String) -Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String) -Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String) - -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 - - def left?; end - def right?; end - - class << self - def wrap_error(*exceptions); end - end -end - -class Unparser::Either::Left < ::Unparser::Either - def bind(&block); end - def either(left, _right); end - def fmap(&block); end - def from_left; end - def from_right; end - def lmap; end -end - -class Unparser::Either::Right < ::Unparser::Either - def bind; end - def either(_left, right); end - def fmap; end - def from_left; end - def from_right; end - def lmap(&block); end -end - -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 - - def buffer; end - def comments; end - def dispatch(*_arg0); end - def emit_mlhs; end - def local_variable_scope; end - def node; end - def node_type; end - - class << self - def anima; end - def emitter(buffer:, comments:, node:, local_variable_scope:); end - def new(*args, &block); end - - private - - def handle(*types); end - end -end - -class Unparser::Emitter::Alias < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def source; end - def target; end -end - -class Unparser::Emitter::Args < ::Unparser::Emitter - def emit_block_arguments; end - def emit_def_arguments; end - def emit_lambda_arguments; end - - private - - def emit_shadowargs; end - def normal_arguments(&block); end - def shadowargs(&block); end -end - -class Unparser::Emitter::Argument < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Array < ::Unparser::Emitter - def emit_heredoc_reminders; end - - private - - def dispatch; end - def emitters(&block); end -end - -class Unparser::Emitter::ArrayPattern < ::Unparser::Emitter - private - - def dispatch; end - def emit_member(node); end -end - -class Unparser::Emitter::Assignment < ::Unparser::Emitter - def emit_heredoc_reminders; end - def emit_left(*_arg0); end - def symbol_name; end - - private - - def dispatch; end - def emit_right; end -end - -Unparser::Emitter::Assignment::BINARY_OPERATOR = T.let(T.unsafe(nil), Array) - -class Unparser::Emitter::Assignment::Constant < ::Unparser::Emitter::Assignment - private - - def base; end - def emit_left; end - def name; end - def remaining_children; end - def right; end -end - -class Unparser::Emitter::Assignment::Variable < ::Unparser::Emitter::Assignment - private - - def emit_left; end - def name; end - def remaining_children; end - def right; end -end - -class Unparser::Emitter::Begin < ::Unparser::Emitter - def emit_heredoc_reminders; end - - private - - def body; end - def dispatch; end - def remaining_children; end -end - -class Unparser::Emitter::Binary < ::Unparser::Emitter - private - - def dispatch; end - def writer(&block); end -end - -class Unparser::Emitter::BinaryAssign < ::Unparser::Emitter - def emit_heredoc_reminders; end - - private - - def dispatch; end - def expression; end - def remaining_children; end - def target; end -end - -Unparser::Emitter::BinaryAssign::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Block < ::Unparser::Emitter - private - - def arguments; end - def body; end - def dispatch; end - def emit_block_arguments; end - def emit_lambda_arguments; end - def emit_send_target; end - def emit_target; end - def need_do?; end - def numblock?; end - def remaining_children; end - def target; end - def target_writer(&block); end - def write_close; end - def write_open; end -end - -class Unparser::Emitter::BlockPass < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::CBase < ::Unparser::Emitter - private - - def dispatch; end -end - -class Unparser::Emitter::Case < ::Unparser::Emitter - private - - def condition; end - def dispatch; end - def emit_condition; end - def emit_else; end - def emit_whens; end - def remaining_children; end - def whens(&block); end -end - -class Unparser::Emitter::CaseGuard < ::Unparser::Emitter - private - - def condition; end - def dispatch; end - def remaining_children; end -end - -Unparser::Emitter::CaseGuard::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::CaseMatch < ::Unparser::Emitter - private - - def dispatch; end - def else_branch; end - def emit_else_branch; end - def patterns(&block); end - def remaining_children; end - def target; end -end - -class Unparser::Emitter::Class < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - def local_variable_scope(&block); end - - private - - def body; end - def dispatch; end - def emit_superclass; end - def name; end - def remaining_children; end - def superclass; end -end - -class Unparser::Emitter::Const < ::Unparser::Emitter - private - - def dispatch; end - def emit_scope; end - def name; end - def remaining_children; end - def scope; end -end - -class Unparser::Emitter::ConstPattern < ::Unparser::Emitter - private - - def const; end - def dispatch; end - def pattern; end - def remaining_children; end -end - -class Unparser::Emitter::DStr < ::Unparser::Emitter - def emit_heredoc_reminders; end - - private - - def dispatch; end -end - -class Unparser::Emitter::DSym < ::Unparser::Emitter - private - - def dispatch; end - def emit_begin_child(component); end - def emit_str_child(value); end -end - -class Unparser::Emitter::Def < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - def local_variable_scope(&block); end - - private - - def body(*_arg0); end - def dispatch; end - def emit_arguments; end - def emit_name(*_arg0); end -end - -class Unparser::Emitter::Def::Instance < ::Unparser::Emitter::Def - private - - def arguments; end - def body; end - def emit_name; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Def::Singleton < ::Unparser::Emitter::Def - private - - def arguments; end - def body; end - def emit_name; end - def name; end - def remaining_children; end - def subject; end - def subject_without_parens?; end -end - -class Unparser::Emitter::Defined < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def subject; end -end - -class Unparser::Emitter::FlipFlop < ::Unparser::Emitter - def symbol_name; end - - private - - def dispatch; end - def left; end - def remaining_children; end - def right; end -end - -Unparser::Emitter::FlipFlop::MAP = T.let(T.unsafe(nil), Hash) -Unparser::Emitter::FlipFlop::SYMBOLS = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Float < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def value; end -end - -Unparser::Emitter::Float::INFINITY = T.let(T.unsafe(nil), Float) -Unparser::Emitter::Float::NEG_INFINITY = T.let(T.unsafe(nil), Float) - -class Unparser::Emitter::FlowModifier < ::Unparser::Emitter - def emit_heredoc_reminders; end - - private - - def dispatch; end - def emit_arguments; end -end - -Unparser::Emitter::FlowModifier::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::For < ::Unparser::Emitter - private - - def assignment; end - def body; end - def condition; end - def dispatch; end - def emit_condition; end - def remaining_children; end -end - -class Unparser::Emitter::Hash < ::Unparser::Emitter - def emit_heredoc_reminders; end - def emit_last_argument_hash; end - - private - - def dispatch; end - def emit_hash_body; end - def emit_heredoc_reminder_member(node); end -end - -class Unparser::Emitter::HashPattern < ::Unparser::Emitter - def emit_const_pattern; end - - private - - def dispatch; end - def emit_hash_body; end - def emit_match_var(node); end - def emit_member(node); end - def emit_pair(node); end - def write_symbol_body(symbol); end -end - -class Unparser::Emitter::Hookexe < ::Unparser::Emitter - private - - def body; end - def dispatch; end - def remaining_children; end -end - -Unparser::Emitter::Hookexe::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::If < ::Unparser::Emitter - def emit_ternary; end - - private - - def condition; end - def dispatch; end - def else_branch; end - def emit_condition; end - def emit_else_branch; end - def emit_if_branch; end - def emit_normal; end - def emit_postcondition; end - def if_branch; end - def keyword; end - def postcondition?; end - def remaining_children; end - def unless?; end -end - -class Unparser::Emitter::InMatch < ::Unparser::Emitter - private - - def dispatch; end - def pattern; end - def remaining_children; end - def target; end -end - -class Unparser::Emitter::InPattern < ::Unparser::Emitter - private - - def branch; end - def dispatch; end - def else_branch; end - def remaining_children; end - def target; end - def unless_guard; end -end - -class Unparser::Emitter::Index < ::Unparser::Emitter - private - - def dispatch; end - def emit_receiver; end -end - -class Unparser::Emitter::Index::Assign < ::Unparser::Emitter::Index - def dispatch; end - def emit_heredoc_reminders; end - def emit_mlhs; end - - private - - def emit_operation(indices); end -end - -Unparser::Emitter::Index::Assign::NO_VALUE_PARENT = T.let(T.unsafe(nil), Set) -Unparser::Emitter::Index::Assign::VALUE_RANGE = T.let(T.unsafe(nil), Range) - -class Unparser::Emitter::Index::Reference < ::Unparser::Emitter::Index - private - - def emit_operation; end - def indices(&block); end -end - -class Unparser::Emitter::KWBegin < ::Unparser::Emitter - private - - def dispatch; end - def emit_multiple_body; end -end - -class Unparser::Emitter::KeywordOptional < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end - def value; end -end - -class Unparser::Emitter::KwSplat < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def subject; end -end - -class Unparser::Emitter::Kwarg < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Kwargs < ::Unparser::Emitter - def dispatch; end -end - -class Unparser::Emitter::Lambda < ::Unparser::Emitter - private - - def dispatch; end -end - -module Unparser::Emitter::LocalVariableRoot - def local_variable_scope; end - - class << self - def included(descendant); end - end -end - -class Unparser::Emitter::MASGN < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def source; end - def target; end -end - -class Unparser::Emitter::MLHS < ::Unparser::Emitter - private - - def dispatch; end - def emit_many; end - def emit_one_child_mlhs; end -end - -Unparser::Emitter::MLHS::NO_COMMA = T.let(T.unsafe(nil), Array) -class Unparser::Emitter::Match < ::Unparser::Emitter; end - -class Unparser::Emitter::Match::CurrentLine < ::Unparser::Emitter::Match - private - - def dispatch; end - def regexp; end - def remaining_children; end -end - -class Unparser::Emitter::Match::Lvasgn < ::Unparser::Emitter::Match - private - - def dispatch; end - def lvasgn; end - def regexp; end - def remaining_children; end -end - -class Unparser::Emitter::MatchAlt < ::Unparser::Emitter - private - - def dispatch; end - def left; end - def remaining_children; end - def right; end -end - -class Unparser::Emitter::MatchAs < ::Unparser::Emitter - private - - def dispatch; end - def left; end - def remaining_children; end - def right; end -end - -class Unparser::Emitter::MatchPattern < ::Unparser::Emitter - private - - def dispatch; end - def pattern; end - def remaining_children; end - def target; end -end - -class Unparser::Emitter::MatchRest < ::Unparser::Emitter - def emit_array_pattern; end - def emit_hash_pattern; end - - private - - def emit_match_var; end - def match_var; end - def remaining_children; end -end - -class Unparser::Emitter::MatchVar < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Module < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - def local_variable_scope(&block); end - - private - - def body; end - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Morearg < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -Unparser::Emitter::Morearg::MAP = T.let(T.unsafe(nil), Hash) -Unparser::Emitter::NO_INDENT = T.let(T.unsafe(nil), Array) - -class Unparser::Emitter::NthRef < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -Unparser::Emitter::NthRef::PREFIX = T.let(T.unsafe(nil), String) - -class Unparser::Emitter::OpAssign < ::Unparser::Emitter - private - - def dispatch; end - def emit_operator; end - def operator; end - def remaining_children; end - def target; end - def value; end -end - -class Unparser::Emitter::Optarg < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end - def value; end -end - -class Unparser::Emitter::Pair < ::Unparser::Emitter - private - - def colon?(key); end - def dispatch; end - def key; end - def remaining_children; end - def value; end -end - -Unparser::Emitter::Pair::BAREWORD = T.let(T.unsafe(nil), Regexp) - -class Unparser::Emitter::Pin < ::Unparser::Emitter - private - - def dispatch; end - def remaining_children; end - def target; end -end - -class Unparser::Emitter::Post < ::Unparser::Emitter - private - - def body; end - def condition; end - def dispatch; end - def remaining_children; end -end - -Unparser::Emitter::Post::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Primitive < ::Unparser::Emitter - private - - def remaining_children; end - def value; end -end - -class Unparser::Emitter::Primitive::Complex < ::Unparser::Emitter::Primitive - private - - def dispatch; end - def emit_imaginary; end - def imaginary_node; end -end - -Unparser::Emitter::Primitive::Complex::MAP = T.let(T.unsafe(nil), Hash) -Unparser::Emitter::Primitive::Complex::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -class Unparser::Emitter::Primitive::Inspect < ::Unparser::Emitter::Primitive - private - - def dispatch; end -end - -class Unparser::Emitter::Primitive::Numeric < ::Unparser::Emitter::Primitive - private - - def dispatch; end -end - -class Unparser::Emitter::Primitive::Rational < ::Unparser::Emitter::Primitive - private - - def dispatch; end - def write_rational(value); end -end - -Unparser::Emitter::Primitive::Rational::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -class Unparser::Emitter::Procarg < ::Unparser::Emitter - private - - def dispatch; end - def needs_parens?; end -end - -Unparser::Emitter::Procarg::PARENS = T.let(T.unsafe(nil), Array) -Unparser::Emitter::REGISTRY = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Range < ::Unparser::Emitter - def symbol_name; end - - private - - def begin_node; end - def dispatch; end - def end_node; end - def remaining_children; end -end - -Unparser::Emitter::Range::SYMBOLS = T.let(T.unsafe(nil), Hash) -Unparser::Emitter::Range::TOKENS = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Regexp < ::Unparser::Emitter - private - - def body(&block); end - def dispatch; end - def emit_body(node); end - def emit_options; end -end - -class Unparser::Emitter::Repetition < ::Unparser::Emitter - private - - def body; end - def condition; end - def dispatch; end - def emit_keyword; end - def emit_normal; end - def emit_postcontrol; end - def postcontrol?; end - def remaining_children; end -end - -Unparser::Emitter::Repetition::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Rescue < ::Unparser::Emitter - private - - def dispatch; end -end - -class Unparser::Emitter::Restarg < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::Root < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - def dispatch; end - def local_variable_scope(&block); end -end - -Unparser::Emitter::Root::END_NL = T.let(T.unsafe(nil), Array) - -class Unparser::Emitter::SClass < ::Unparser::Emitter - private - - def body; end - def dispatch; end - def object; end - def remaining_children; end -end - -class Unparser::Emitter::Send < ::Unparser::Emitter - def emit_heredoc_reminders; end - def emit_mlhs; end - - private - - def dispatch; end - def writer(&block); end -end - -class Unparser::Emitter::Simple < ::Unparser::Emitter - private - - def dispatch; end -end - -Unparser::Emitter::Simple::MAP = T.let(T.unsafe(nil), Hash) - -class Unparser::Emitter::Splat < ::Unparser::Emitter - def emit_mlhs; end - - private - - def dispatch; end - def remaining_children; end - def subject; end - def subject_emitter(&block); end -end - -class Unparser::Emitter::Super < ::Unparser::Emitter - private - - def dispatch; end -end - -class Unparser::Emitter::Undef < ::Unparser::Emitter - private - - def dispatch; end -end - -class Unparser::Emitter::Variable < ::Unparser::Emitter - private - - def dispatch; end - def name; end - def remaining_children; end -end - -class Unparser::Emitter::When < ::Unparser::Emitter - private - - def captures(&block); end - def dispatch; end - def emit_captures; end -end - -class Unparser::Emitter::XStr < ::Unparser::Emitter - private - - def dispatch; end - def emit_begin(component); end - def emit_heredoc; end - def emit_string(value); end - def emit_xstr; end - def escape_xstr(input); end - def heredoc?; end -end - -class Unparser::Emitter::Yield < ::Unparser::Emitter - private - - def dispatch; end -end - -class Unparser::Equalizer < ::Module - def initialize(*keys); end - - private - - def define_cmp_method; end - def define_hash_method; end - def define_inspect_method; end - def define_methods; end - def included(descendant); end -end - -module Unparser::Equalizer::Methods - def ==(other); end - def eql?(other); end -end - -module Unparser::Generation - def emit_heredoc_reminders; end - def symbol_name; end - def write_to_buffer; end - - private - - def children; end - def conditional_parentheses(flag, &block); end - def delimited(nodes, delimiter = T.unsafe(nil), &block); end - def emit_body(node, indent: T.unsafe(nil)); end - def emit_body_ensure_rescue(node); end - def emit_body_inner(node); end - def emit_body_member(node); end - def emit_body_rescue(node); end - def emit_comments(comments); end - def emit_comments_before(source_part = T.unsafe(nil)); end - def emit_ensure(node); end - def emit_eof_comments; end - def emit_eol_comments; end - def emit_join(nodes, emit_node, emit_delimiter); end - def emit_optional_body(node, indent: T.unsafe(nil)); end - def emit_optional_body_ensure_rescue(node); end - def emit_rescue_postcontrol(node); end - def emit_rescue_regular(node); end - def emitter(node); end - def first_child; end - def indented; end - def k_end; end - def nl; end - def parentheses(open = T.unsafe(nil), close = T.unsafe(nil)); end - def visit(node); end - def visit_deep(node); end - def with_comments; end - def write(*strings); end - def writer_with(klass, node); end - def ws; end -end - -Unparser::Generation::EXTRA_NL = T.let(T.unsafe(nil), Array) - -class Unparser::InvalidNodeError < ::RuntimeError - def initialize(message, node); end - - def node; end -end - -module Unparser::NodeDetails - include ::Unparser::NodeHelpers - include ::Unparser::Constants - - private - - def children; end - - class << self - def included(descendant); end - end -end - -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 - - def arguments(&block); end - def arguments?; end - def assignment?(&block); end - def assignment_operator?; end - def binary_syntax_allowed?; end - def non_assignment_selector; end - def receiver; end - def selector; end - def selector_binary_operator?; end - def selector_unary_operator?; end - def string_selector(&block); end - - private - - def remaining_children; end -end - -Unparser::NodeDetails::Send::ASSIGN_SUFFIX = T.let(T.unsafe(nil), String) -Unparser::NodeDetails::Send::NON_ASSIGN_RANGE = T.let(T.unsafe(nil), Range) - -module Unparser::NodeHelpers - def n(type, children = T.unsafe(nil)); end - def n?(type, node); end - def s(type, *children); end - def unwrap_single_begin(node); end - - private - - def n_arg?(node); end - def n_args?(node); end - def n_array?(node); end - def n_array_pattern?(node); end - def n_begin?(node); end - def n_block?(node); end - def n_cbase?(node); end - def n_const?(node); end - def n_dstr?(node); end - def n_empty_else?(node); end - def n_ensure?(node); end - def n_hash?(node); end - def n_hash_pattern?(node); end - def n_if?(node); end - def n_in_pattern?(node); end - def n_int?(node); end - def n_kwarg?(node); end - def n_kwargs?(node); end - def n_kwsplat?(node); end - def n_lambda?(node); end - def n_match_rest?(node); end - def n_pair?(node); end - def n_rescue?(node); end - def n_send?(node); end - def n_shadowarg?(node); end - def n_splat?(node); end - def n_str?(node); end - def n_sym?(node); end -end - -module Unparser::RequireBlock - private - - def require_block; end -end - -class Unparser::UnknownNodeError < ::ArgumentError; end - -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 - - def generated_node; end - def generated_source; end - def identification; end - def original_node; end - def original_source; end - def report(&block); end - def success?; end - - private - - def make_report(label, attribute_name); end - def node_diff_report; end - def report_exception(exception); end - - class << self - def anima; end - def from_node(original_node); end - def from_path(path); end - def from_string(original_source); end - - private - - def const_unit(_value); end - end -end - -class Unparser::Validation::Literal < ::Unparser::Validation - def report; end - def success?; end - - private - - def source_diff_report; end -end - -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 - def included(descendant); end - end -end - -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 - - def buffer; end - def comments; end - def dispatch; end - def emit_operator; end - def local_variable_scope; end - def node; end - def symbol_name; end - - private - - def effective_symbol; end - def emit_with(map); end - def keyword_symbol; end - def left; end - def left_emitter(&block); end - def operator_symbol; end - def remaining_children; end - def right; end - def right_emitter(&block); end - - class << self - def anima; end - end -end - -Unparser::Writer::Binary::KEYWORD_SYMBOLS = T.let(T.unsafe(nil), Hash) -Unparser::Writer::Binary::KEYWORD_TOKENS = T.let(T.unsafe(nil), Hash) -Unparser::Writer::Binary::MAP = T.let(T.unsafe(nil), Hash) -Unparser::Writer::Binary::NEED_KEYWORD = T.let(T.unsafe(nil), Array) -Unparser::Writer::Binary::OPERATOR_SYMBOLS = T.let(T.unsafe(nil), Hash) -Unparser::Writer::Binary::OPERATOR_TOKENS = T.let(T.unsafe(nil), Hash) - -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 - - def buffer; end - def comments; end - def dispatch; end - def emit_heredoc_reminder; end - def local_variable_scope; end - def node; end - - private - - def breakpoint?(child, current); end - def classify(node); end - def classify_str(node); end - def emit_body(children); end - def emit_dstr; end - def emit_dynamic(child); end - def emit_dynamic_component(node); end - def emit_heredoc_body; end - def emit_heredoc_footer; end - def emit_heredoc_header; end - def emit_normal_heredoc_body; end - def emit_segment(children, index); end - def emit_squiggly_heredoc_body; end - def escape_dynamic(string); end - def heredoc?; end - def heredoc_header; end - def heredoc_pattern?; end - def heredoc_pattern_2?; end - def heredoc_pattern_3?; end - def nl_last_child?; end - def segments; end - def str_empty?(node); end - def str_nl?(node); end - def str_ws?(node); end - - class << self - def anima; end - end -end - -Unparser::Writer::DynamicString::FLAT_INTERPOLATION = T.let(T.unsafe(nil), Set) -Unparser::Writer::DynamicString::PATTERNS_2 = T.let(T.unsafe(nil), Array) -Unparser::Writer::DynamicString::PATTERNS_3 = T.let(T.unsafe(nil), Array) - -class Unparser::Writer::Resbody - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::DSL - - def buffer; end - def comments; end - def emit_postcontrol; end - def emit_regular; end - def local_variable_scope; end - def node; end - - private - - def assignment; end - def body; end - def emit_assignment; end - def emit_exception; end - def exception; end - def remaining_children; end - - class << self - def anima; end - end -end - -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 - - def buffer; end - def comments; end - def emit_heredoc_reminders; end - def emit_postcontrol; end - def emit_regular; end - def local_variable_scope; end - def node; end - - private - - def body; end - def else_node; end - def emit_rescue_body(node); end - def remaining_children; end - def rescue_bodies(&block); end - def rescue_body; end - - class << self - def anima; end - end -end - -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 - - def buffer; end - def comments; end - def dispatch; end - def emit_heredoc_reminders; end - def emit_mlhs; end - def emit_selector; end - def local_variable_scope; end - def node; end - - private - - def arguments; end - def avoid_clash?; end - def details(&block); end - def effective_writer(&block); end - def effective_writer_class; end - def emit_arguments; end - def emit_heredoc_reminder(argument); end - def emit_normal_arguments; end - def emit_operator; end - def emit_send_regular(node); end - def local_variable_clash?; end - def parses_as_constant?; end - def receiver; end - def remaining_children; end - def selector; end - def write_as_attribute_assignment?; end - - class << self - def anima; end - end -end - -class Unparser::Writer::Send::AttributeAssignment < ::Unparser::Writer::Send - def dispatch; end - def emit_send_mlhs; end - - private - - def emit_attribute; end - def emit_receiver; end - def first_argument; end - def receiver; end - def remaining_children; end - def selector; end -end - -class Unparser::Writer::Send::Binary < ::Unparser::Writer::Send - def dispatch; end - - private - - def emit_operator; end - def emit_right; end -end - -Unparser::Writer::Send::INDEX_ASSIGN = T.let(T.unsafe(nil), Symbol) -Unparser::Writer::Send::INDEX_REFERENCE = T.let(T.unsafe(nil), Symbol) -Unparser::Writer::Send::OPERATORS = T.let(T.unsafe(nil), Hash) - -class Unparser::Writer::Send::Regular < ::Unparser::Writer::Send - def dispatch; end - def emit_arguments_without_heredoc_body; end - def emit_receiver; end - def emit_send_mlhs; end -end - -class Unparser::Writer::Send::Unary < ::Unparser::Writer::Send - def dispatch; end -end - -Unparser::Writer::Send::Unary::MAP = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/webrick@1.7.0.rbi b/sorbet/rbi/gems/webrick@1.7.0.rbi deleted file mode 100644 index 4e62468b..00000000 --- a/sorbet/rbi/gems/webrick@1.7.0.rbi +++ /dev/null @@ -1,595 +0,0 @@ -# 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`. - -module WEBrick::AccessLog - private - - def escape(data); end - def format(format_string, params); end - def setup_params(config, req, res); end - - class << self - def escape(data); end - def format(format_string, params); end - def setup_params(config, req, res); end - end -end - -class WEBrick::BasicLog - def initialize(log_file = T.unsafe(nil), level = T.unsafe(nil)); end - - def <<(obj); end - def close; end - def debug(msg); end - def debug?; end - def error(msg); end - def error?; end - def fatal(msg); end - def fatal?; end - def info(msg); end - def info?; end - def level; end - def level=(_arg0); end - def log(level, data); end - def warn(msg); end - def warn?; end - - private - - def format(arg); end -end - -class WEBrick::GenericServer - def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end - - def [](key); end - def config; end - def listen(address, port); end - def listeners; end - def logger; end - def run(sock); end - def shutdown; end - def start(&block); end - def status; end - def stop; end - def tokens; end - - private - - def accept_client(svr); end - def alarm_shutdown_pipe; end - def call_callback(callback_name, *args); end - def cleanup_listener; end - def cleanup_shutdown_pipe(shutdown_pipe); end - def setup_shutdown_pipe; end - def start_thread(sock, &block); end -end - -module WEBrick::HTMLUtils - private - - def escape(string); end - - class << self - def escape(string); end - end -end - -module WEBrick::HTTPAuth - private - - def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end - def basic_auth(req, res, realm, &block); end - def proxy_basic_auth(req, res, realm, &block); end - - class << self - def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end - def basic_auth(req, res, realm, &block); end - def proxy_basic_auth(req, res, realm, &block); end - end -end - -module WEBrick::HTTPAuth::Authenticator - def logger; end - def realm; end - def userdb; end - - private - - def check_init(config); end - def check_scheme(req); end - def error(fmt, *args); end - def info(fmt, *args); end - def log(meth, fmt, *args); end -end - -WEBrick::HTTPAuth::Authenticator::AuthException = WEBrick::HTTPStatus::Unauthorized - -class WEBrick::HTTPAuth::BasicAuth - include ::WEBrick::HTTPAuth::Authenticator - - def initialize(config, default = T.unsafe(nil)); end - - def authenticate(req, res); end - def challenge(req, res); end - def logger; end - def realm; end - def userdb; end - - class << self - def make_passwd(realm, user, pass); end - end -end - -class WEBrick::HTTPAuth::DigestAuth - include ::WEBrick::HTTPAuth::Authenticator - - def initialize(config, default = T.unsafe(nil)); end - - def algorithm; end - def authenticate(req, res); end - def challenge(req, res, stale = T.unsafe(nil)); end - def qop; end - - private - - def _authenticate(req, res); end - def check_nonce(req, auth_req); end - def check_opaque(opaque_struct, req, auth_req); end - def check_uri(req, auth_req); end - def generate_next_nonce(req); end - def generate_opaque(req); end - def hexdigest(*args); end - def split_param_value(string); end - - class << self - def make_passwd(realm, user, pass); end - end -end - -class WEBrick::HTTPAuth::Htdigest - include ::WEBrick::HTTPAuth::UserDB - - def initialize(path); end - - def delete_passwd(realm, user); end - def each; end - def flush(output = T.unsafe(nil)); end - def get_passwd(realm, user, reload_db); end - def reload; end - def set_passwd(realm, user, pass); end -end - -class WEBrick::HTTPAuth::Htgroup - def initialize(path); end - - def add(group, members); end - def flush(output = T.unsafe(nil)); end - def members(group); end - def reload; end -end - -class WEBrick::HTTPAuth::Htpasswd - include ::WEBrick::HTTPAuth::UserDB - - def initialize(path, password_hash: T.unsafe(nil)); end - - def delete_passwd(realm, user); end - def each; end - def flush(output = T.unsafe(nil)); end - def get_passwd(realm, user, reload_db); end - def reload; end - def set_passwd(realm, user, pass); end -end - -WEBrick::HTTPAuth::ProxyAuthenticator::AuthException = WEBrick::HTTPStatus::ProxyAuthenticationRequired - -class WEBrick::HTTPAuth::ProxyBasicAuth < ::WEBrick::HTTPAuth::BasicAuth - include ::WEBrick::HTTPAuth::ProxyAuthenticator -end - -class WEBrick::HTTPAuth::ProxyDigestAuth < ::WEBrick::HTTPAuth::DigestAuth - include ::WEBrick::HTTPAuth::ProxyAuthenticator - - private - - def check_uri(req, auth_req); end -end - -module WEBrick::HTTPAuth::UserDB - def auth_type; end - def auth_type=(_arg0); end - def get_passwd(realm, user, reload_db = T.unsafe(nil)); end - def make_passwd(realm, user, pass); end - def set_passwd(realm, user, pass); end -end - -class WEBrick::HTTPRequest - def initialize(config); end - - def [](header_name); end - def accept; end - def accept_charset; end - def accept_encoding; end - def accept_language; end - def addr; end - def attributes; end - def body(&block); end - def body_reader; end - def content_length; end - def content_type; end - def continue; end - def cookies; end - def each; end - def fixup; end - def header; end - def host; end - def http_version; end - def keep_alive; end - def keep_alive?; end - def meta_vars; end - def parse(socket = T.unsafe(nil)); end - def path; end - def path_info; end - def path_info=(_arg0); end - def peeraddr; end - def port; end - def query; end - def query_string; end - def query_string=(_arg0); end - def raw_header; end - def readpartial(size, buf = T.unsafe(nil)); end - def remote_ip; end - def request_line; end - def request_method; end - def request_time; end - def request_uri; end - def script_name; end - def script_name=(_arg0); end - def server_name; end - def ssl?; end - def to_s; end - def unparsed_uri; end - def user; end - def user=(_arg0); end - - private - - def _read_data(io, method, *arg); end - def parse_query; end - def parse_uri(str, scheme = T.unsafe(nil)); end - def read_body(socket, block); end - def read_chunk_size(socket); end - def read_chunked(socket, block); end - def read_data(io, size); end - def read_header(socket); end - def read_line(io, size = T.unsafe(nil)); end - def read_request_line(socket); end - def setup_forwarded_info; end -end - -WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) - -class WEBrick::HTTPResponse - def initialize(config); end - - def [](field); end - def []=(field, value); end - def body; end - def body=(_arg0); end - def chunked=(val); end - def chunked?; end - def config; end - def content_length; end - def content_length=(len); end - def content_type; end - def content_type=(type); end - def cookies; end - def each; end - def filename; end - def filename=(_arg0); end - def header; end - def http_version; end - def keep_alive; end - def keep_alive=(_arg0); end - def keep_alive?; end - def make_body_tempfile; end - def reason_phrase; end - def reason_phrase=(_arg0); end - def remove_body_tempfile; end - def request_http_version; end - def request_http_version=(_arg0); end - def request_method; end - def request_method=(_arg0); end - def request_uri; end - def request_uri=(_arg0); end - def send_body(socket); end - def send_header(socket); end - def send_response(socket); end - def sent_size; end - def set_error(ex, backtrace = T.unsafe(nil)); end - def set_redirect(status, url); end - def setup_header; end - def status; end - def status=(status); end - def status_line; end - - private - - def _write_data(socket, data); end - def check_header(header_value); end - def error_body(backtrace, ex, host, port); end - def send_body_io(socket); end - def send_body_proc(socket); end - def send_body_string(socket); end -end - -class WEBrick::HTTPResponse::ChunkedWrapper - def initialize(socket, resp); end - - def <<(*buf); end - def write(buf); end -end - -class WEBrick::HTTPServer < ::WEBrick::GenericServer - def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end - - def access_log(config, req, res); end - def create_request(with_webrick_config); end - def create_response(with_webrick_config); end - def do_OPTIONS(req, res); end - def lookup_server(req); end - def mount(dir, servlet, *options); end - def mount_proc(dir, proc = T.unsafe(nil), &block); end - def run(sock); end - def search_servlet(path); end - def service(req, res); end - def umount(dir); end - def unmount(dir); end - def virtual_host(server); end -end - -class WEBrick::HTTPServer::MountTable - def initialize; end - - def [](dir); end - def []=(dir, val); end - def delete(dir); end - def scan(path); end - - private - - def compile; end - def normalize(dir); end -end - -class WEBrick::HTTPServlet::AbstractServlet - def initialize(server, *options); end - - def do_GET(req, res); end - def do_HEAD(req, res); end - def do_OPTIONS(req, res); end - def service(req, res); end - - private - - def redirect_to_directory_uri(req, res); end - - class << self - def get_instance(server, *options); end - end -end - -class WEBrick::HTTPServlet::CGIHandler < ::WEBrick::HTTPServlet::AbstractServlet - def initialize(server, name); end - - def do_GET(req, res); end - def do_POST(req, res); end -end - -WEBrick::HTTPServlet::CGIHandler::CGIRunnerArray = T.let(T.unsafe(nil), Array) - -class WEBrick::HTTPServlet::DefaultFileHandler < ::WEBrick::HTTPServlet::AbstractServlet - def initialize(server, local_path); end - - def do_GET(req, res); end - def make_partial_content(req, res, filename, filesize); end - def multipart_body(body, parts, boundary, mtype, filesize); end - def not_modified?(req, res, mtime, etag); end - def prepare_range(range, filesize); end -end - -class WEBrick::HTTPServlet::ERBHandler < ::WEBrick::HTTPServlet::AbstractServlet - def initialize(server, name); end - - def do_GET(req, res); end - def do_POST(req, res); end - - private - - def evaluate(erb, servlet_request, servlet_response); end -end - -class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServlet - def initialize(server, root, options = T.unsafe(nil), default = T.unsafe(nil)); end - - def do_GET(req, res); end - def do_OPTIONS(req, res); end - def do_POST(req, res); end - def service(req, res); end - def set_filesystem_encoding(str); end - - private - - def call_callback(callback_name, req, res); end - def check_filename(req, res, name); end - def exec_handler(req, res); end - def get_handler(req, res); end - def nondisclosure_name?(name); end - def prevent_directory_traversal(req, res); end - def search_file(req, res, basename); end - def search_index_file(req, res); end - def set_dir_list(req, res); end - def set_filename(req, res); end - def shift_path_info(req, res, path_info, base = T.unsafe(nil)); end - def trailing_pathsep?(path); end - def windows_ambiguous_name?(name); end - - class << self - def add_handler(suffix, handler); end - def remove_handler(suffix); end - end -end - -module WEBrick::HTTPStatus - private - - def client_error?(code); end - def error?(code); end - def info?(code); end - def reason_phrase(code); end - def redirect?(code); end - def server_error?(code); end - def success?(code); end - - class << self - def [](code); end - def client_error?(code); end - def error?(code); end - def info?(code); end - def reason_phrase(code); end - def redirect?(code); end - def server_error?(code); end - def success?(code); end - end -end - -class WEBrick::HTTPStatus::Status < ::StandardError - def code; end - def reason_phrase; end - def to_i; end - - class << self - def code; end - def reason_phrase; end - end -end - -module WEBrick::HTTPUtils - private - - def _escape(str, regex); end - def _make_regex(str); end - def _make_regex!(str); end - def _unescape(str, regex); end - def dequote(str); end - def escape(str); end - def escape8bit(str); end - def escape_form(str); end - def escape_path(str); end - def load_mime_types(file); end - def mime_type(filename, mime_tab); end - def normalize_path(path); end - def parse_form_data(io, boundary); end - def parse_header(raw); end - def parse_query(str); end - def parse_qvalues(value); end - def parse_range_header(ranges_specifier); end - def quote(str); end - def split_header_value(str); end - def unescape(str); end - def unescape_form(str); end - - class << self - def _escape(str, regex); end - def _make_regex(str); end - def _make_regex!(str); end - def _unescape(str, regex); end - def dequote(str); end - def escape(str); end - def escape8bit(str); end - def escape_form(str); end - def escape_path(str); end - def load_mime_types(file); end - def mime_type(filename, mime_tab); end - def normalize_path(path); end - def parse_form_data(io, boundary); end - def parse_header(raw); end - def parse_query(str); end - def parse_qvalues(value); end - def parse_range_header(ranges_specifier); end - def quote(str); end - def split_header_value(str); end - def unescape(str); end - def unescape_form(str); end - end -end - -class WEBrick::HTTPUtils::FormData < ::String - def initialize(*args); end - - def <<(str); end - def [](*key); end - def append_data(data); end - def each_data; end - def filename; end - def filename=(_arg0); end - def list; end - def name; end - def name=(_arg0); end - def next_data=(_arg0); end - def to_ary; end - def to_s; end - - protected - - def next_data; end -end - -module WEBrick::Utils - private - - def create_listeners(address, port); end - def getservername; end - def random_string(len); end - def set_close_on_exec(io); end - def set_non_blocking(io); end - def su(user); end - def timeout(seconds, exception = T.unsafe(nil)); end - - class << self - def create_listeners(address, port); end - def getservername; end - def random_string(len); end - def set_close_on_exec(io); end - def set_non_blocking(io); end - def su(user); end - def timeout(seconds, exception = T.unsafe(nil)); end - end -end - -class WEBrick::Utils::TimeoutHandler - include ::Singleton - extend ::Singleton::SingletonClassMethods - - def initialize; end - - def cancel(thread, id); end - def interrupt(thread, id, exception); end - def register(thread, time, exception); end - def terminate; end - - private - - def watch; end - def watcher; end - - class << self - def cancel(id); end - def register(seconds, exception); end - def terminate; end - end -end diff --git a/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi deleted file mode 100644 index 21e2d580..00000000 --- a/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +++ /dev/null @@ -1,199 +0,0 @@ -# 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`. - -module YARDSorbet; end - -module YARDSorbet::Directives - class << self - sig { params(docstring: String, directives: T::Array[String]).void } - def add_directives(docstring, directives); end - - sig { params(docstring: T.nilable(String)).returns([YARD::Docstring, T::Array[String]]) } - def extract_directives(docstring); end - end -end - -module YARDSorbet::Handlers; end - -class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end -end - -YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String) -YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String) - -class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end - - private - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Boolean) } - def const_assign_node?(node); end -end - -class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end - - private - - sig { returns(YARD::CodeObjects::NamespaceObject) } - def included_in; end -end - -class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end - - class << self - sig { params(code_obj: String).returns(T.nilable(String)) } - def mixed_in_class_methods(code_obj); end - end -end - -class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end - - private - - sig { params(method_node: YARD::Parser::Ruby::AstNode, node: YARD::Parser::Ruby::AstNode, docstring: YARD::Docstring).void } - def parse_params(method_node, node, docstring); end - - sig { params(node: YARD::Parser::Ruby::AstNode, docstring: YARD::Docstring).void } - def parse_return(node, docstring); end - - sig { params(method_node: YARD::Parser::Ruby::AstNode, docstring: YARD::Docstring).void } - def parse_sig(method_node, docstring); end -end - -YARDSorbet::Handlers::SigHandler::ATTR_NODE_TYPES = T.let(T.unsafe(nil), Array) - -module YARDSorbet::Handlers::StructClassHandler - sig { void } - def process; end - - private - - sig { params(object: YARD::CodeObjects::MethodObject, props: T::Array[YARDSorbet::TStructProp], docstring: YARD::Docstring, directives: T::Array[String]).void } - def decorate_t_struct_init(object, props, docstring, directives); end - - sig { params(props: T::Array[YARDSorbet::TStructProp], class_ns: YARD::CodeObjects::ClassObject).void } - def process_t_struct_props(props, class_ns); end - - sig { params(props: T::Array[YARDSorbet::TStructProp]).returns(T::Array[[String, T.nilable(String)]]) } - def to_object_parameters(props); end -end - -class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base - sig { void } - def process; end - - private - - sig { params(object: YARD::CodeObjects::MethodObject, prop: YARDSorbet::TStructProp).void } - def decorate_object(object, prop); end - - sig { returns(T.nilable(String)) } - def default_value; end - - sig { params(name: String).returns(YARDSorbet::TStructProp) } - def make_prop(name); end - - sig { params(object: YARD::CodeObjects::MethodObject, name: String).void } - def register_attrs(object, name); end - - sig { params(prop: YARDSorbet::TStructProp).void } - def update_state(prop); end -end - -module YARDSorbet::NodeUtils - class << self - sig { params(node: YARD::Parser::Ruby::AstNode, _blk: T.proc.params(n: YARD::Parser::Ruby::AstNode).void).void } - def bfs_traverse(node, &_blk); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T.any(YARD::Parser::Ruby::MethodCallNode, YARD::Parser::Ruby::MethodDefinitionNode)) } - def get_method_node(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(YARD::Parser::Ruby::AstNode) } - def sibling_node(node); end - end -end - -YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) -YARDSorbet::NodeUtils::SIGABLE_NODE = T.type_alias { T.any(YARD::Parser::Ruby::MethodCallNode, YARD::Parser::Ruby::MethodDefinitionNode) } -YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array) - -module YARDSorbet::SigToYARD - class << self - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert(node); end - - private - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(String) } - def build_generic_type(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_aref(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_array(node); end - - sig { params(node: YARD::Parser::Ruby::MethodCallNode).returns(T::Array[String]) } - def convert_call(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_collection(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_hash(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_list(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_node(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_node_type(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_ref(node); end - - sig { params(node: YARD::Parser::Ruby::MethodCallNode).returns(T::Array[String]) } - def convert_t_method(node); end - - sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert_unknown(node); end - end -end - -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 - def inherited(s); end - end -end - -module YARDSorbet::TagUtils - class << self - sig { params(docstring: YARD::Docstring, tag_name: String, name: T.nilable(String)).returns(T.nilable(YARD::Tags::Tag)) } - def find_tag(docstring, tag_name, name); end - - sig { params(docstring: YARD::Docstring, tag_name: String, types: T.nilable(T::Array[String]), name: T.nilable(String), text: String).void } - def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end - end -end - -YARDSorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/yard@0.9.27.rbi b/sorbet/rbi/gems/yard@0.9.27.rbi deleted file mode 100644 index e2b16084..00000000 --- a/sorbet/rbi/gems/yard@0.9.27.rbi +++ /dev/null @@ -1,4106 +0,0 @@ -# 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`. - -class Array - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Array - - def place(*values); end -end - -class File < ::IO - class << self - def cleanpath(path, rel_root = T.unsafe(nil)); end - def open!(file, *args, &block); end - def read_binary(file); end - def relative_path(from, to); end - end -end - -File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) -File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) - -module Gem - class << self - def source_index; end - end -end - -Gem::Cache = Gem::SourceIndex -Gem::ConfigMap = T.let(T.unsafe(nil), Hash) - -module Gem::DefaultUserInteraction - include ::Gem::Text -end - -Gem::HAVE_OPENSSL = T.let(T.unsafe(nil), String) -Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES = T.let(T.unsafe(nil), TrueClass) - -class Gem::List - include ::Enumerable -end - -Gem::RbConfigPriorities = T.let(T.unsafe(nil), Array) -Gem::RubyGemsVersion = T.let(T.unsafe(nil), String) - -class Gem::RuntimeRequirementNotMetError < ::Gem::InstallError - def message; end - def suggestion; end - def suggestion=(_arg0); end -end - -class Gem::Source - include ::Comparable - include ::Gem::Text -end - -class Gem::SourceIndex - include ::Enumerable - - def initialize(specifications = T.unsafe(nil)); end - - def ==(other); end - def add_spec(gem_spec, name = T.unsafe(nil)); end - def add_specs(*gem_specs); end - def all_gems; end - def dump; end - def each(&block); end - def find_name(gem_name, requirement = T.unsafe(nil)); end - def gem_signature(gem_full_name); end - def gems; end - def index_signature; end - def latest_specs(include_prerelease = T.unsafe(nil)); end - def length; end - def load_gems_in(*spec_dirs); end - def outdated; end - def prerelease_gems; end - def prerelease_specs; end - def refresh!; end - def released_gems; end - def released_specs; end - def remove_spec(full_name); end - def search(gem_pattern, platform_only = T.unsafe(nil)); end - def size; end - def spec_dirs; end - def spec_dirs=(_arg0); end - def specification(full_name); end - - class << self - def from_gems_in(*spec_dirs); end - def from_installed_gems(*deprecated); end - def installed_spec_directories; end - def load_specification(file_name); end - end -end - -class Gem::Specification < ::Gem::BasicSpecification - include ::Bundler::GemHelpers - include ::Bundler::MatchPlatform - extend ::Gem::Deprecate - extend ::Enumerable -end - -Gem::Specification::REMOVED_METHODS = T.let(T.unsafe(nil), Array) - -class Gem::SpecificationPolicy - include ::Gem::Text - include ::Gem::DefaultUserInteraction - include ::Gem::UserInteraction - - def initialize(specification); end - - def packaging; end - def packaging=(_arg0); end - def validate(strict = T.unsafe(nil)); end - def validate_dependencies; end - def validate_duplicate_dependencies; end - def validate_metadata; end - def validate_optional(strict); end - def validate_permissions; end - def validate_required!; end - - private - - def error(statement); end - def help_text; end - def validate_array_attribute(field); end - def validate_array_attributes; end - def validate_attribute_present(attribute); end - def validate_authors_field; end - def validate_extensions; end - def validate_lazy_metadata; end - def validate_licenses; end - def validate_licenses_length; end - def validate_name; end - def validate_nil_attributes; end - def validate_non_files; end - def validate_platform; end - def validate_removed_attributes; end - def validate_require_paths; end - def validate_required_attributes; end - def validate_rubygems_version; end - def validate_self_inclusion_in_files_list; end - def validate_shebang_line_in(executable); end - def validate_specification_version; end - def validate_values; end - def warning(statement); end -end - -Gem::SpecificationPolicy::HOMEPAGE_URI_PATTERN = T.let(T.unsafe(nil), Regexp) -Gem::SpecificationPolicy::LAZY = T.let(T.unsafe(nil), String) -Gem::SpecificationPolicy::LAZY_PATTERN = T.let(T.unsafe(nil), Regexp) -Gem::SpecificationPolicy::METADATA_LINK_KEYS = T.let(T.unsafe(nil), Array) -Gem::SpecificationPolicy::SPECIAL_CHARACTERS = T.let(T.unsafe(nil), Regexp) -Gem::SpecificationPolicy::VALID_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) -Gem::SpecificationPolicy::VALID_URI_PATTERN = T.let(T.unsafe(nil), Regexp) - -class Gem::StreamUI - extend ::Gem::Deprecate -end - -class Gem::StreamUI::SilentDownloadReporter - def initialize(out_stream, *args); end - - def done; end - def fetch(filename, filesize); end - def update(current); end -end - -class Gem::StreamUI::SilentProgressReporter - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -class Gem::StreamUI::SimpleProgressReporter - include ::Gem::Text - include ::Gem::DefaultUserInteraction - - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -class Gem::StreamUI::ThreadedDownloadReporter - def initialize(out_stream, *args); end - - def done; end - def fetch(file_name, *args); end - def file_name; end - def update(bytes); end - - private - - def locked_puts(message); end -end - -Gem::StreamUI::ThreadedDownloadReporter::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) - -class Gem::StreamUI::VerboseProgressReporter - include ::Gem::Text - include ::Gem::DefaultUserInteraction - - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -Gem::UNTAINT = T.let(T.unsafe(nil), Proc) - -class Gem::UninstallError < ::Gem::Exception - def spec; end - def spec=(_arg0); end -end - -class Gem::UnknownCommandError < ::Gem::Exception - def initialize(unknown_command); end - - def unknown_command; end - - class << self - def attach_correctable; end - end -end - -class Gem::UnknownCommandSpellChecker - def initialize(error); end - - def corrections; end - def error; end - - private - - def spell_checker; end -end - -Gem::UnsatisfiableDepedencyError = Gem::UnsatisfiableDependencyError - -module Gem::UserInteraction - include ::Gem::Text - include ::Gem::DefaultUserInteraction -end - -class Gem::Version - include ::Comparable -end - -Gem::Version::Requirement = Gem::Requirement - -class IRB::SLex - def initialize; end - - def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end - def def_rules(*tokens, &block); end - def inspect; end - def match(token); end - def postproc(token); end - def preproc(token, proc); end - def search(token); end -end - -IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier) -IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) -IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) -IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) - -class IRB::SLex::Node - def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - - def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - def match(chrs, op = T.unsafe(nil)); end - def match_io(io, op = T.unsafe(nil)); end - def postproc; end - def postproc=(_arg0); end - def preproc; end - def preproc=(_arg0); end - def search(chrs, opt = T.unsafe(nil)); end -end - -class Insertion - def initialize(list, value); end - - def after(val, recursive = T.unsafe(nil)); end - def after_any(val); end - def before(val, recursive = T.unsafe(nil)); end - def before_any(val); end - - private - - def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end -end - -class Module - def class_name; end -end - -RUBY19 = T.let(T.unsafe(nil), TrueClass) - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend - - def shell_split; end -end - -class SymbolHash < ::Hash - def initialize(symbolize_value = T.unsafe(nil)); end - - def [](key); end - def []=(key, value); end - def delete(key); end - def has_key?(key); end - def key?(key); end - def merge(hash); end - def merge!(hash); end - def update(hash); end - - class << self - def [](*hsh); end - end -end - -class WEBrick::HTTPRequest - def version_supplied; end - def version_supplied=(_arg0); end - def xhr?; end -end - -WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) - -module YARD - class << self - def load_plugins; end - def parse(*args); end - def parse_string(*args); end - def ruby18?; end - def ruby19?; end - def ruby2?; end - def ruby3?; end - def windows?; end - end -end - -module YARD::CLI; end - -class YARD::CLI::Command - def description; end - - protected - - def common_options(opts); end - def load_script(file); end - def parse_options(opts, args); end - def unrecognized_option(err); end - - class << self - def run(*args); end - end -end - -class YARD::CLI::CommandParser - def initialize; end - - def run(*args); end - - private - - def commands; end - def list_commands; end - - class << self - def commands; end - def commands=(_arg0); end - def default_command; end - def default_command=(_arg0); end - def run(*args); end - end -end - -class YARD::CLI::Config < ::YARD::CLI::Command - def initialize; end - - def append; end - def append=(_arg0); end - def as_list; end - def as_list=(_arg0); end - def description; end - def gem_install_cmd; end - def gem_install_cmd=(_arg0); end - def key; end - def key=(_arg0); end - def reset; end - def reset=(_arg0); end - def run(*args); end - def values; end - def values=(_arg0); end - - private - - def configure_gemrc; end - def encode_value(value); end - def encode_values; end - def list_configuration; end - def modify_item; end - def optparse(*args); end - def view_item; end -end - -class YARD::CLI::Diff < ::YARD::CLI::Command - def initialize; end - - def description; end - def run(*args); end - - private - - def added_objects(registry1, registry2); end - def all_objects; end - def cleanup(gemfile); end - def expand_and_parse(gemfile, io); end - def expand_gem(gemfile, io); end - def generate_yardoc(dir); end - def load_gem_data(gemfile); end - def load_git_commit(commit); end - def modified_objects(registry1, registry2); end - def optparse(*args); end - def removed_objects(registry1, registry2); end - def require_rubygems; end -end - -class YARD::CLI::Display < ::YARD::CLI::Yardoc - def initialize(*args); end - - def description; end - def format_objects; end - def output_options(opts); end - def parse_arguments(*args); end - def run(*args); end - def wrap_layout(contents); end -end - -class YARD::CLI::Gems < ::YARD::CLI::Command - def initialize; end - - def description; end - def run(*args); end - - private - - def add_gems(gems); end - def build_gems; end - def optparse(*args); end -end - -class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand - def initialize; end - - def description; end - def objects; end - def options; end - def run(*args); end - - private - - def optparse(*args); end - def unrecognized_option(err); end -end - -class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions - def contents; end - def contents=(_arg0); end - def dependencies; end - def dependencies=(_arg0); end - def format; end - def format=(_arg0); end - def full; end - def full=(_arg0); end -end - -class YARD::CLI::Help < ::YARD::CLI::Command - def description; end - def run(*args); end -end - -class YARD::CLI::I18n < ::YARD::CLI::Yardoc - def initialize; end - - def description; end - def run(*args); end - - private - - def general_options(opts); end - def generate_pot(relative_base_path); end -end - -class YARD::CLI::List < ::YARD::CLI::Command - def description; end - def run(*args); end -end - -class YARD::CLI::MarkupTypes < ::YARD::CLI::Command - def description; end - def run(*args); end -end - -class YARD::CLI::Server < ::YARD::CLI::Command - def initialize; end - - def adapter; end - def adapter=(_arg0); end - def description; end - def libraries; end - def libraries=(_arg0); end - def options; end - def options=(_arg0); end - def run(*args); end - def scripts; end - def scripts=(_arg0); end - def server_options; end - def server_options=(_arg0); end - def template_paths; end - def template_paths=(_arg0); end - - private - - def add_gems; end - def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end - def add_libraries(args); end - def create_library_version_if_yardopts_exist(library, dir); end - def extract_db_from_options_file(options_file); end - def generate_doc_for_first_time(libver); end - def load_scripts; end - def load_template_paths; end - def optparse(*args); end - def select_adapter; end -end - -class YARD::CLI::Stats < ::YARD::CLI::Yardoc - include ::YARD::Templates::Helpers::BaseHelper - - def initialize(parse = T.unsafe(nil)); end - - def all_objects; end - def description; end - def output(name, data, undoc = T.unsafe(nil)); end - def parse; end - def parse=(_arg0); end - def print_statistics; end - def print_undocumented_objects; end - def run(*args); end - def stats_for_attributes; end - def stats_for_classes; end - def stats_for_constants; end - def stats_for_files; end - def stats_for_methods; end - def stats_for_modules; end - - private - - def general_options(opts); end - def optparse(*args); end - def type_statistics(type); end -end - -YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) - -class YARD::CLI::YRI < ::YARD::CLI::Command - def initialize; end - - def description; end - def run(*args); end - - protected - - def cache_object(name, path); end - def find_object(name); end - def print_object(object); end - def print_usage; end - - private - - def add_default_paths; end - def add_gem_paths; end - def load_cache; end - def optparse(*args); end - def try_load_object(name, cache_path); end - - class << self - def run(*args); end - end -end - -YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String) -YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) -YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) - -class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand - def initialize; end - - def all_objects; end - def apis; end - def apis=(_arg0); end - def assets; end - def assets=(_arg0); end - def description; end - def excluded; end - def excluded=(_arg0); end - def fail_on_warning; end - def fail_on_warning=(_arg0); end - def files; end - def files=(_arg0); end - def generate; end - def generate=(_arg0); end - def has_markup; end - def has_markup=(_arg0); end - def hidden_apis; end - def hidden_apis=(_arg0); end - def hidden_tags; end - def hidden_tags=(_arg0); end - def list; end - def list=(_arg0); end - def options; end - def parse_arguments(*args); end - def run(*args); end - def save_yardoc; end - def save_yardoc=(_arg0); end - def statistics; end - def statistics=(_arg0); end - def use_cache; end - def use_cache=(_arg0); end - def visibilities; end - def visibilities=(_arg0); end - - private - - def add_api_verifier; end - def add_extra_files(*files); end - def add_tag(tag_data, factory_method = T.unsafe(nil)); end - def add_visibility_verifier; end - def apply_locale; end - def copy_assets; end - def extra_file_valid?(file, check_exists = T.unsafe(nil)); end - def general_options(opts); end - def optparse(*args); end - def output_options(opts); end - def parse_files(*files); end - def print_list; end - def run_generate(checksums); end - def run_verifier(list); end - def tag_options(opts); end - def verify_markup_options; end -end - -class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions - def file; end - def file=(_arg0); end - def files; end - def files=(_arg0); end - def format; end - def format=(_arg0); end - def index; end - def index=(_arg0); end - def item; end - def item=(_arg0); end - def locale; end - def locale=(_arg0); end - def objects; end - def objects=(_arg0); end - def onefile; end - def onefile=(_arg0); end - def readme; end - def readme=(_arg0); end - def serializer; end - def serializer=(_arg0); end - def title; end - def title=(_arg0); end - def verifier; end - def verifier=(_arg0); end -end - -class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command - def initialize; end - - def options_file; end - def options_file=(_arg0); end - def parse_arguments(*args); end - def use_document_file; end - def use_document_file=(_arg0); end - def use_yardopts_file; end - def use_yardopts_file=(_arg0); end - - protected - - def yardopts_options(opts); end - - private - - def parse_rdoc_document_file(file = T.unsafe(nil)); end - def parse_yardopts(file = T.unsafe(nil)); end - def parse_yardopts_options(*args); end - def support_rdoc_document_file!(file = T.unsafe(nil)); end - def yardopts(file = T.unsafe(nil)); end -end - -YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String) -YARD::CONFIG_DIR = T.let(T.unsafe(nil), String) - -module YARD::CodeObjects - extend ::YARD::CodeObjects::NamespaceMapper -end - -YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array) -YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array) -YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array) -YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash) -YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) - -class YARD::CodeObjects::Base - def initialize(namespace, name, *_arg2); end - - def ==(other); end - def [](key); end - def []=(key, value); end - def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end - def add_tag(*tags); end - def base_docstring; end - def copy_to(other); end - def docstring(locale = T.unsafe(nil)); end - def docstring=(comments); end - def dynamic; end - def dynamic=(_arg0); end - def dynamic?; end - def eql?(other); end - def equal?(other); end - def file; end - def files; end - def format(options = T.unsafe(nil)); end - def group; end - def group=(_arg0); end - def has_tag?(name); end - def hash; end - def inspect; end - def line; end - def method_missing(meth, *args, &block); end - def name(prefix = T.unsafe(nil)); end - def namespace; end - def namespace=(obj); end - def parent; end - def parent=(obj); end - def path; end - def relative_path(other); end - def root?; end - def sep; end - def signature; end - def signature=(_arg0); end - def source; end - def source=(statement); end - def source_type; end - def source_type=(_arg0); end - def tag(name); end - def tags(name = T.unsafe(nil)); end - def title; end - def to_ary; end - def to_s; end - def type; end - def visibility; end - def visibility=(v); end - - protected - - def copyable_attributes; end - - private - - def format_source(source); end - def translate_docstring(locale); end - - class << self - def ===(other); end - def new(namespace, name, *args, &block); end - end -end - -YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp) -YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp) -YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String) -YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) - -class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject - def initialize(namespace, name, *args, &block); end - - def constants(opts = T.unsafe(nil)); end - def inheritance_tree(include_mods = T.unsafe(nil)); end - def inherited_constants; end - def inherited_meths(opts = T.unsafe(nil)); end - def is_exception?; end - def meths(opts = T.unsafe(nil)); end - def superclass; end - def superclass=(object); end -end - -class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base - def value; end - def value=(_arg0); end -end - -class YARD::CodeObjects::CodeObjectList < ::Array - def initialize(owner = T.unsafe(nil)); end - - def <<(value); end - def push(value); end -end - -class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base - def value; end - def value=(value); end -end - -class YARD::CodeObjects::ExtendedMethodObject - def initialize(obj); end - - def method_missing(sym, *args, &block); end - def scope; end -end - -class YARD::CodeObjects::ExtraFileObject - def initialize(filename, contents = T.unsafe(nil)); end - - def ==(other); end - def attributes; end - def attributes=(_arg0); end - def contents; end - def contents=(contents); end - def eql?(other); end - def equal?(other); end - def filename; end - def filename=(_arg0); end - def hash; end - def inspect; end - def locale; end - def locale=(locale); end - def name; end - def name=(_arg0); end - def path; end - def title; end - def to_s; end - def type; end - - private - - def ensure_parsed; end - def parse_contents(data); end - def translate(data); end -end - -YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String) -YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String) -YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp) -YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base - def attached?; end - def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - def macro_data; end - def macro_data=(_arg0); end - def method_object; end - def method_object=(_arg0); end - def path; end - def sep; end - - class << self - def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end - def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - def create(macro_name, data, method_object = T.unsafe(nil)); end - def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end - def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - def find(macro_name); end - def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end - end -end - -YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base - def initialize(namespace, name, scope = T.unsafe(nil), &block); end - - def aliases; end - def attr_info; end - def constructor?; end - def explicit; end - def explicit=(_arg0); end - def is_alias?; end - def is_attribute?; end - def is_explicit?; end - def module_function?; end - def name(prefix = T.unsafe(nil)); end - def overridden_method; end - def parameters; end - def parameters=(_arg0); end - def path; end - def reader?; end - def scope; end - def scope=(v); end - def sep; end - def writer?; end - - protected - - def copyable_attributes; end -end - -class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject - def inheritance_tree(include_mods = T.unsafe(nil)); end -end - -YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp) -YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String) -YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String) - -module YARD::CodeObjects::NamespaceMapper - def clear_separators; end - def default_separator(value = T.unsafe(nil)); end - def register_separator(sep, *valid_types); end - def separators; end - def separators_for_type(type); end - def separators_match; end - def types_for_separator(sep); end - def unregister_separator_by_type(type); end - - class << self - def default_separator; end - def default_separator=(_arg0); end - def invalidate; end - def map; end - def map_match; end - def on_invalidate(&block); end - def rev_map; end - end -end - -class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base - def initialize(namespace, name, *args, &block); end - - def aliases; end - def attributes; end - def child(opts = T.unsafe(nil)); end - def children; end - def class_attributes; end - def class_mixins; end - def constants(opts = T.unsafe(nil)); end - def cvars; end - def groups; end - def groups=(_arg0); end - def included_constants; end - def included_meths(opts = T.unsafe(nil)); end - def instance_attributes; end - def instance_mixins; end - def meths(opts = T.unsafe(nil)); end - def mixins(*scopes); end -end - -YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::CodeObjects::Proxy - def initialize(namespace, name, type = T.unsafe(nil)); end - - def <=>(other); end - def ==(other); end - def ===(other); end - def class; end - def equal?(other); end - def hash; end - def inspect; end - def instance_of?(klass); end - def is_a?(klass); end - def kind_of?(klass); end - def method_missing(meth, *args, &block); end - def name(prefix = T.unsafe(nil)); end - def namespace; end - def parent; end - def path; end - def respond_to?(meth, include_private = T.unsafe(nil)); end - def root?; end - def title; end - def to_s; end - def to_str; end - def type; end - def type=(type); end - - private - - def proxy_path; end - def to_ary; end - def to_obj; end - - class << self - def ===(other); end - end -end - -class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end - -class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject - def equal?(other); end - def hash; end - def inspect; end - def path; end - def root?; end - def title; end -end - -class YARD::Config - class << self - def add_ignored_plugins_file; end - def arguments; end - def load; end - def load_autoload_plugins; end - def load_commandline_plugins; end - def load_commandline_safemode; end - def load_gem_plugins; end - def load_plugin(name); end - def load_plugin_failed(name, exception); end - def load_plugins; end - def options; end - def options=(_arg0); end - def read_config_file; end - def save; end - def translate_plugin_name(name); end - def translate_plugin_names; end - def with_yardopts; end - end -end - -YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String) -YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String) -YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash) -YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String) -YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp) - -class YARD::Docstring < ::String - def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end - - def +(other); end - def add_tag(*tags); end - def all; end - def all=(content, parse = T.unsafe(nil)); end - def blank?(only_visible_tags = T.unsafe(nil)); end - def delete_tag_if(&block); end - def delete_tags(name); end - def dup; end - def has_tag?(name); end - def hash_flag; end - def hash_flag=(v); end - def line; end - def line_range; end - def line_range=(_arg0); end - def object; end - def object=(_arg0); end - def ref_tags; end - def replace(content, parse = T.unsafe(nil)); end - def resolve_reference; end - def summary; end - def tag(name); end - def tags(name = T.unsafe(nil)); end - def to_raw; end - def to_s; end - - private - - def convert_ref_tags; end - def parse_comments(comments); end - def stable_sort_by(list); end - - class << self - def default_parser; end - def default_parser=(_arg0); end - def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end - def parser(*args); end - end -end - -YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::DocstringParser - def initialize(library = T.unsafe(nil)); end - - def create_directive(tag_name, tag_buf); end - def create_ref_tag(tag_name, name, object_name); end - def create_tag(tag_name, tag_buf = T.unsafe(nil)); end - def directives; end - def directives=(_arg0); end - def handler; end - def handler=(_arg0); end - def library; end - def library=(_arg0); end - def object; end - def object=(_arg0); end - def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end - def parse_content(content); end - def post_process; end - def raw_text; end - def raw_text=(_arg0); end - def reference; end - def reference=(_arg0); end - def state; end - def state=(_arg0); end - def tag_is_directive?(tag_name); end - def tags; end - def tags=(_arg0); end - def text; end - def text=(_arg0); end - def to_docstring; end - - private - - def call_after_parse_callbacks; end - def call_directives_after_parse; end - def detect_reference(content); end - def namespace; end - - class << self - def after_parse(&block); end - def after_parse_callbacks; end - end -end - -YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) - -module YARD::GemIndex - private - - def all; end - def each(&block); end - def find_all_by_name(*args); end - - class << self - def all; end - def each(&block); end - def find_all_by_name(*args); end - end -end - -module YARD::Handlers; end - -class YARD::Handlers::Base - include ::YARD::CodeObjects - include ::YARD::Parser - - def initialize(source_parser, stmt); end - - def abort!; end - def call_params; end - def caller_method; end - def ensure_loaded!(object, max_retries = T.unsafe(nil)); end - def extra_state; end - def globals; end - def namespace; end - def namespace=(v); end - def owner; end - def owner=(v); end - def parse_block(*_arg0); end - def parser; end - def process; end - def push_state(opts = T.unsafe(nil)); end - def register(*objects); end - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - def register_dynamic(object); end - def register_ensure_loaded(object); end - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end - def register_group(object, group = T.unsafe(nil)); end - def register_module_function(object); end - def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end - def register_transitive_tags(object); end - def register_visibility(object, visibility = T.unsafe(nil)); end - def scope; end - def scope=(v); end - def statement; end - def visibility; end - def visibility=(v); end - - class << self - def clear_subclasses; end - def handlers; end - def handles(*matches); end - def handles?(statement); end - def in_file(filename); end - def inherited(subclass); end - def matches_file?(filename); end - def namespace_only; end - def namespace_only?; end - def process(&block); end - def subclasses; end - end -end - -module YARD::Handlers::C; end -class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::Handlers::C::Base < ::YARD::Handlers::Base - include ::YARD::Parser::C - include ::YARD::Handlers::Common::MethodHandler - include ::YARD::Handlers::C::HandlerMethods - - def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end - def namespace_for_variable(var); end - def namespaces; end - def override_comments; end - def parse_block(opts = T.unsafe(nil)); end - def process_file(file, object); end - def processed_files; end - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end - def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end - def register_visibility(object, visibility = T.unsafe(nil)); end - def symbols; end - - private - - def remove_var_prefix(var); end - - class << self - def handles?(statement, processor); end - def statement_class(type = T.unsafe(nil)); end - end -end - -YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash) -class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) -YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -module YARD::Handlers::C::HandlerMethods - include ::YARD::Parser::C - include ::YARD::CodeObjects - include ::YARD::Handlers::Common::MethodHandler - - def handle_alias(var_name, new_name, old_name); end - def handle_attribute(var_name, name, read, write); end - def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end - def handle_constants(type, var_name, const_name, value); end - def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end - def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end - - private - - def find_constant_docstring(object); end - def find_method_body(object, symbol); end - def record_parameters(object, symbol, src); end -end - -class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) -YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) -YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) -YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) - -class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end -end - -class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end -YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp) -module YARD::Handlers::Common; end - -module YARD::Handlers::Common::MethodHandler - def add_predicate_return_tag(obj); end -end - -class YARD::Handlers::HandlerAborted < ::RuntimeError; end - -class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError - def initialize(object); end - - def object; end - def object=(_arg0); end -end - -class YARD::Handlers::Processor - def initialize(parser); end - - def extra_state; end - def extra_state=(_arg0); end - def file; end - def file=(_arg0); end - def find_handlers(statement); end - def globals; end - def globals=(_arg0); end - def namespace; end - def namespace=(_arg0); end - def owner; end - def owner=(_arg0); end - def parse_remaining_files; end - def parser_type; end - def parser_type=(_arg0); end - def process(statements); end - def scope; end - def scope=(_arg0); end - def visibility; end - def visibility=(_arg0); end - - private - - def handler_base_class; end - def handler_base_namespace; end - def handles?(handler, statement); end - def load_handlers; end - - class << self - def namespace_for_handler; end - def register_handler_namespace(type, ns); end - end -end - -module YARD::Handlers::Ruby; end -class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end - -class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base - protected - - def validated_attribute_names(params); end -end - -class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base - include ::YARD::Parser::Ruby - extend ::YARD::Parser::Ruby - - def call_params; end - def caller_method; end - def parse_block(inner_node, opts = T.unsafe(nil)); end - - class << self - def handles?(node); end - def meta_type(type); end - def method_call(name = T.unsafe(nil)); end - end -end - -class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base - protected - - def parse_condition; end - def parse_else_block; end - def parse_then_block; end -end - -class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - include ::YARDSorbet::Handlers::StructClassHandler - - private - - def create_struct_superclass(superclass, superclass_def); end - def extract_parameters(superclass); end - def parse_struct_superclass(klass, superclass); end - def parse_superclass(superclass); end - def struct_superclass_name(superclass); end -end - -class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end -class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end - -class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - def extract_parameters(superclass); end - def process_constant(statement); end - def process_structclass(statement); end -end - -class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DSLHandlerMethods -end - -module YARD::Handlers::Ruby::DSLHandlerMethods - include ::YARD::CodeObjects - include ::YARD::Parser - - def handle_comments; end - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - - private - - def find_attached_macro; end - def implicit_docstring?; end - def macro_name_matches(macro); end - def method_name; end - def method_signature; end -end - -YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash) - -module YARD::Handlers::Ruby::DecoratorHandlerMethods - def process_decorator(*nodes, &block); end - - private - - def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end -end - -class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end - -class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler - def scope; end - - private - - def process_mixin(mixin); end -end - -class YARD::Handlers::Ruby::HandlesExtension - def initialize(name); end - - def matches?(node); end - - protected - - def name; end -end - -module YARD::Handlers::Ruby::Legacy; end -class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end -class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base - include ::YARD::Parser::Ruby::Legacy::RubyToken - - def call_params; end - def caller_method; end - def parse_block(opts = T.unsafe(nil)); end - - private - - def extract_method_details; end - def tokval(token, *accepted_types); end - def tokval_list(tokenlist, *accepted_types); end - - class << self - def handles?(stmt); end - end -end - -class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base - protected - - def parse_condition; end - def parse_else_block; end - def parse_then_block; end -end - -class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - def create_struct_superclass(superclass, superclass_def); end - def extract_parameters(superstring); end - def parse_struct_subclass(klass, superclass_def); end - def parse_superclass(superclass); end - def struct_superclass_name(superclass); end -end - -class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end -YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) -class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - def extract_parameters(parameters); end - def process_structclass(classname, parameters); end -end - -YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::DSLHandlerMethods -end - -class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler - def scope; end - - private - - def process_mixin(mixin); end -end - -class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - def process_mixin(mixin); end -end - -class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end -class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - def privatize_class_method(name); end -end - -class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - def privatize_constant(name); end -end - -class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end -class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension - def matches?(node); end -end - -class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end - -class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Common::MethodHandler - - def format_args; end -end - -class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base - protected - - def process_mixin(mixin); end - def recipient(mixin); end -end - -class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods - - def make_module_function(instance_method, namespace); end -end - -class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end - -class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods -end - -class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base - private - - def privatize_constant(node); end -end - -class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods -end - -module YARD::Handlers::Ruby::StructHandlerMethods - include ::YARD::CodeObjects - - def add_reader_tags(klass, new_method, member); end - def add_writer_tags(klass, new_method, member); end - def create_attributes(klass, members); end - def create_class(classname, superclass); end - def create_member_method?(klass, member, type = T.unsafe(nil)); end - def create_reader(klass, member); end - def create_writer(klass, member); end - def member_tag_for_member(klass, member, type = T.unsafe(nil)); end - def members_from_tags(klass); end - def return_type_from_tag(member_tag); end -end - -class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension - def matches?(node); end -end - -class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods -end - -class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end -module YARD::I18n; end - -class YARD::I18n::Locale - def initialize(name); end - - def load(locale_directory); end - def name; end - def translate(message); end - - class << self - def default; end - def default=(locale); end - end -end - -class YARD::I18n::Message - def initialize(id); end - - def ==(other); end - def add_comment(comment); end - def add_location(path, line); end - def comments; end - def id; end - def locations; end -end - -class YARD::I18n::Messages - include ::Enumerable - - def initialize; end - - def ==(other); end - def [](id); end - def each(&block); end - def register(id); end - - protected - - def messages; end -end - -class YARD::I18n::PotGenerator - def initialize(relative_base_path); end - - def generate; end - def messages; end - def parse_files(files); end - def parse_objects(objects); end - - private - - def current_time; end - def escape_message_id(message_id); end - def extract_documents(object); end - def extract_paragraphs(file); end - def extract_tag_documents(tag); end - def extract_tag_name(tag); end - def extract_tag_text(tag); end - def generate_message(pot, message); end - def generate_pot_creation_date_value; end - def header; end - def register_message(id); end -end - -class YARD::I18n::Text - def initialize(input, options = T.unsafe(nil)); end - - def extract_messages; end - def translate(locale); end - - private - - def emit_attribute_event(match_data, line_no); end - def emit_empty_line_event(line, line_no); end - def emit_markup_event(line, line_no); end - def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end - def parse(&block); end -end - -class YARD::Logger < ::Logger - def initialize(pipe, *args); end - - def <<(msg = T.unsafe(nil)); end - def backtrace(exc, level_meth = T.unsafe(nil)); end - def capture(msg, nontty_log = T.unsafe(nil)); end - def clear_progress; end - def debug(*args); end - def enter_level(new_level = T.unsafe(nil)); end - def io; end - def io=(pipe); end - def print(msg = T.unsafe(nil)); end - def progress(msg, nontty_log = T.unsafe(nil)); end - def puts(msg = T.unsafe(nil)); end - def show_backtraces; end - def show_backtraces=(_arg0); end - def show_progress; end - def show_progress=(_arg0); end - def warn(*args); end - def warn_no_continuations; end - def warned; end - def warned=(_arg0); end - - private - - def add(*args); end - def clear_line; end - def format_log(sev, _time, _prog, msg); end - def print_no_newline(msg); end - - class << self - def instance(pipe = T.unsafe(nil)); end - end -end - -YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) - -class YARD::Options - def ==(other); end - def [](key); end - def []=(key, value); end - def delete(key); end - def each; end - def inspect; end - def merge(opts); end - def method_missing(meth, *args, &block); end - def reset_defaults; end - def to_hash; end - def update(opts); end - - class << self - def default_attr(key, default); end - end -end - -module YARD::Parser; end - -class YARD::Parser::Base - def initialize(source, filename); end - - def enumerator; end - def parse; end - def tokenize; end - - class << self - def parse(source, filename = T.unsafe(nil)); end - end -end - -module YARD::Parser::C; end - -class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement - def comments; end - def comments=(_arg0); end -end - -class YARD::Parser::C::CParser < ::YARD::Parser::Base - def initialize(source, file = T.unsafe(nil)); end - - def enumerator; end - def parse; end - def tokenize; end - - private - - def advance(num = T.unsafe(nil)); end - def advance_loop; end - def attach_comment(statement); end - def back(num = T.unsafe(nil)); end - def char(num = T.unsafe(nil)); end - def consume_body_statements; end - def consume_comment(add_comment = T.unsafe(nil)); end - def consume_directive; end - def consume_quote(type = T.unsafe(nil)); end - def consume_toplevel_statement; end - def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end - def consume_whitespace; end - def nextchar(num = T.unsafe(nil)); end - def nextline; end - def parse_toplevel; end - def prevchar(num = T.unsafe(nil)); end - def strip_non_statement_data; end - def struct; end -end - -class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement - include ::YARD::Parser::C::CommentParser - - def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end - - def comments; end - def overrides; end - def overrides=(_arg0); end - def statement; end - def statement=(_arg0); end - def type; end - def type=(_arg0); end -end - -module YARD::Parser::C::CommentParser - protected - - def parse_comments(comments); end - - private - - def parse_callseq(comments); end - def parse_overrides(comments); end - def parse_types(types); end - def remove_private_comments(comment); end -end - -class YARD::Parser::C::Statement - def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end - - def comments_hash_flag; end - def comments_hash_flag=(_arg0); end - def comments_range; end - def file; end - def file=(_arg0); end - def first_line; end - def group; end - def group=(_arg0); end - def line; end - def line=(_arg0); end - def line_range; end - def show; end - def signature; end - def source; end - def source=(_arg0); end -end - -class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement - def block; end - def block=(_arg0); end - def comments; end - def comments=(_arg0); end - def declaration; end - def declaration=(_arg0); end -end - -class YARD::Parser::OrderedParser - def initialize(global_state, files); end - - def files; end - def files=(_arg0); end - def parse; end -end - -class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end - -module YARD::Parser::Ruby - def s(*args); end -end - -class YARD::Parser::Ruby::AstNode < ::Array - def initialize(type, arr, opts = T.unsafe(nil)); end - - def ==(other); end - def block?; end - def call?; end - def children; end - def comments; end - def comments_hash_flag; end - def comments_range; end - def condition?; end - def def?; end - def docstring; end - def docstring=(_arg0); end - def docstring_hash_flag; end - def docstring_hash_flag=(_arg0); end - def docstring_range; end - def docstring_range=(_arg0); end - def file; end - def file=(_arg0); end - def first_line; end - def full_source; end - def full_source=(_arg0); end - def group; end - def group=(_arg0); end - def has_line?; end - def inspect; end - def jump(*node_types); end - def kw?; end - def line; end - def line_range; end - def line_range=(_arg0); end - def literal?; end - def loop?; end - def parent; end - def parent=(_arg0); end - def pretty_print(q); end - def ref?; end - def show; end - def source; end - def source=(_arg0); end - def source_range; end - def source_range=(_arg0); end - def to_s; end - def token?; end - def traverse; end - def type; end - def type=(_arg0); end - def unfreeze; end - - private - - def reset_line_info; end - - class << self - def node_class_for(type); end - end -end - -YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) - -class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode - def block; end - def class_name; end - def superclass; end -end - -class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode - def comments; end - def docstring; end - def docstring=(value); end - def first_line; end - def source; end -end - -class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode - def condition; end - def condition?; end - def else_block; end - def then_block; end - - private - - def cmod?; end -end - -class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode - def kw?; end -end - -module YARD::Parser::Ruby::Legacy; end - -class YARD::Parser::Ruby::Legacy::RubyLex - include ::YARD::Parser::Ruby::Legacy::RubyToken - include ::IRB - - def initialize(content); end - - def char_no; end - def continue; end - def exception_on_syntax_error; end - def exception_on_syntax_error=(_arg0); end - def get_read; end - def getc; end - def getc_of_rests; end - def gets; end - def identify_comment; end - def identify_gvar; end - def identify_here_document; end - def identify_identifier; end - def identify_number(start); end - def identify_quotation(initial_char); end - def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end - def indent; end - def lex; end - def lex_init; end - def lex_int2; end - def lex_state; end - def line_no; end - def peek(i = T.unsafe(nil)); end - def peek_equal?(str); end - def read_auto_clean_up; end - def read_auto_clean_up=(_arg0); end - def read_escape; end - def skip_inner_expression; end - def skip_space; end - def skip_space=(_arg0); end - def token; end - def ungetc(c = T.unsafe(nil)); end - - class << self - def debug?; end - end -end - -YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array) - -class YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader - def initialize(content); end - - def column; end - def divert_read_from(reserve); end - def get_read; end - def getc; end - def getc_already_read; end - def line_num; end - def peek(at); end - def peek_equal(str); end - def ungetc(_ch); end -end - -YARD::Parser::Ruby::Legacy::RubyLex::DEINDENT_CLAUSE = T.let(T.unsafe(nil), Array) -YARD::Parser::Ruby::Legacy::RubyLex::DLtype2Token = T.let(T.unsafe(nil), Hash) -YARD::Parser::Ruby::Legacy::RubyLex::ENINDENT_CLAUSE = T.let(T.unsafe(nil), Array) -YARD::Parser::Ruby::Legacy::RubyLex::Ltype2Token = T.let(T.unsafe(nil), Hash) -YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_LTYPE = T.let(T.unsafe(nil), Hash) -YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_PAREN = T.let(T.unsafe(nil), Hash) - -class YARD::Parser::Ruby::Legacy::RubyParser < ::YARD::Parser::Base - def initialize(source, _filename); end - - def encoding_line; end - def enumerator; end - def parse; end - def shebang_line; end - def tokenize; end -end - -module YARD::Parser::Ruby::Legacy::RubyToken - def Token(token, value = T.unsafe(nil)); end - def set_token_position(line, char); end - - class << self - def def_token(token_n, super_token = T.unsafe(nil), reading = T.unsafe(nil), *opts); end - end -end - -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_ARG = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_BEG = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_CLASS = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_DOT = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_END = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_FNAME = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_MID = T.let(T.unsafe(nil), Symbol) -YARD::Parser::Ruby::Legacy::RubyToken::NEWLINE_TOKEN = T.let(T.unsafe(nil), YARD::Parser::Ruby::Legacy::RubyToken::TkNL) - -class YARD::Parser::Ruby::Legacy::RubyToken::OPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkALIAS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkAMPER < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkANDOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkAREF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkASET < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkASSIGN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkASSOC < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKQUOTE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKSLASH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACK_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITXOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBREAK < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkBlockContents < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def text; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCASE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkCLASS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCMP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMA < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMENT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkCONSTANT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDEFINED < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkDIV < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOLLAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkDREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkDXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkELSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkELSIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkEND_OF_SCRIPT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkENSURE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkEQQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkError < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkFALSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkFID < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkFLOAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkFOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkGEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkGT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkGVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkIDENTIFIER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkIF_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkINTEGER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkIVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkId < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def initialize(line_no, char_no, name); end - - def name; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkKW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkLABEL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkLEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkLPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkLSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkLT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkMOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkMODULE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkMULT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNEXT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkNIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkNL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNOTOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNTH_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkNode < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def node; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - def initialize(line_no, char_no, op); end - - def op; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkOROP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkOp < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def name; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkPOW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkQUESTION < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkREDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkRESCUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkRETRY < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkRETURN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkRPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkRSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash) -class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def text; end -end - -YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash) -class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def initialize(line_no, char_no, _id); end - - def name; end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - def initialize(line_no, char_no, value = T.unsafe(nil)); end -end - -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end -class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end -class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -class YARD::Parser::Ruby::Legacy::RubyToken::Token - def initialize(line_no, char_no); end - - def char_no; end - def lex_state; end - def lex_state=(_arg0); end - def line_no; end - def set_text(text); end - def text; end -end - -YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String) -YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array) - -class YARD::Parser::Ruby::Legacy::Statement - def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end - - def block; end - def comments; end - def comments_hash_flag; end - def comments_hash_flag=(_arg0); end - def comments_range; end - def comments_range=(_arg0); end - def first_line; end - def group; end - def group=(_arg0); end - def inspect; end - def line; end - def line_range; end - def show; end - def signature; end - def source(include_block = T.unsafe(nil)); end - def to_s(include_block = T.unsafe(nil)); end - def tokens; end - - private - - def clean_tokens(tokens); end -end - -class YARD::Parser::Ruby::Legacy::StatementList < ::Array - include ::YARD::Parser::Ruby::Legacy::RubyToken - - def initialize(content); end - - def encoding_line; end - def encoding_line=(_arg0); end - def shebang_line; end - def shebang_line=(_arg0); end - - private - - def balances?(tk); end - def next_statement; end - def parse_statements; end - def peek_no_space; end - def process_block_token(tk); end - def process_complex_block_opener(tk); end - def process_initial_comment(tk); end - def process_simple_block_opener(tk); end - def process_statement_end(tk); end - def process_token(tk); end - def push_token(tk); end - def sanitize_block; end - def sanitize_statement_end; end -end - -YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array) - -class YARD::Parser::Ruby::Legacy::TokenList < ::Array - include ::YARD::Parser::Ruby::Legacy::RubyToken - - def initialize(content = T.unsafe(nil)); end - - def <<(*tokens); end - def push(*tokens); end - def squeeze(type = T.unsafe(nil)); end - def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end - - private - - def convert_token(lex, tk); end - def parse_content(content); end -end - -class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode - def literal?; end -end - -class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode - def block; end - def condition; end - def loop?; end -end - -class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode - def block; end - def block_param; end - def call?; end - def method_name(name_only = T.unsafe(nil)); end - def namespace; end - def parameters(include_block_param = T.unsafe(nil)); end - - private - - def call_has_paren?; end - def index_adjust; end -end - -class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode - def block(*_arg0); end - def def?; end - def kw?; end - def method_name(name_only = T.unsafe(nil)); end - def namespace; end - def parameters(include_block_param = T.unsafe(nil)); end - def signature; end - - private - - def index_adjust; end -end - -class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode - def block; end - def module_name; end -end - -class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode - def block_param; end - def double_splat_param; end - def named_params; end - def splat_param; end - def unnamed_end_params; end - def unnamed_optional_params; end - def unnamed_required_params; end -end - -class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode - def namespace; end - def path; end - def ref?; end -end - -class YARD::Parser::Ruby::RipperParser < ::Ripper - def initialize(source, filename, *args); end - - def ast; end - def charno; end - def comments; end - def encoding_line; end - def enumerator; end - def file; end - def file_encoding; end - def frozen_string_line; end - def on_BEGIN(*args); end - def on_CHAR(tok); end - def on_END(*args); end - def on___end__(tok); end - def on_alias(*args); end - def on_alias_error(*args); end - def on_arg_ambiguous(*args); end - def on_arg_paren(*args); end - def on_args_add(list, item); end - def on_args_add_block(list, item); end - def on_args_add_star(list, item); end - def on_args_forward(*args); end - def on_args_new(*args); end - def on_aryptn(*args); end - def on_assign(*args); end - def on_assign_error(*args); end - def on_assoc_splat(*args); end - def on_backref(tok); end - def on_backtick(tok); end - def on_begin(*args); end - def on_binary(*args); end - def on_block_var(*args); end - def on_blockarg(*args); end - def on_brace_block(*args); end - def on_break(*args); end - def on_call(*args); end - def on_case(*args); end - def on_class(*args); end - def on_class_name_error(*args); end - def on_comma(tok); end - def on_command(*args); end - def on_command_call(*args); end - def on_const(tok); end - def on_const_path_field(*args); end - def on_const_ref(*args); end - def on_cvar(tok); end - def on_def(*args); end - def on_defined(*args); end - def on_defs(*args); end - def on_do_block(*args); end - def on_dot2(*args); end - def on_dot3(*args); end - def on_else(*args); end - def on_elsif(*args); end - def on_embexpr_beg(tok); end - def on_embexpr_end(tok); end - def on_embvar(tok); end - def on_ensure(*args); end - def on_excessed_comma(*args); end - def on_fcall(*args); end - def on_field(*args); end - def on_float(tok); end - def on_fndptn(*args); end - def on_for(*args); end - def on_gvar(tok); end - def on_heredoc_beg(tok); end - def on_heredoc_dedent(*args); end - def on_heredoc_end(tok); end - def on_hshptn(*args); end - def on_ident(tok); end - def on_if(*args); end - def on_if_mod(*args); end - def on_ifop(*args); end - def on_ignored_nl(tok); end - def on_ignored_sp(tok); end - def on_imaginary(tok); end - def on_in(*args); end - def on_int(tok); end - def on_ivar(tok); end - def on_kw(tok); end - def on_kwrest_param(*args); end - def on_label_end(tok); end - def on_lbrace(tok); end - def on_lparen(tok); end - def on_magic_comment(*args); end - def on_massign(*args); end - def on_method_add_arg(list, item); end - def on_method_add_block(list, item); end - def on_mlhs_add(list, item); end - def on_mlhs_add_post(list, item); end - def on_mlhs_add_star(list, item); end - def on_mlhs_new(*args); end - def on_mlhs_paren(*args); end - def on_module(*args); end - def on_mrhs_add(list, item); end - def on_mrhs_add_star(list, item); end - def on_mrhs_new(*args); end - def on_mrhs_new_from_args(*args); end - def on_next(*args); end - def on_nl(tok); end - def on_nokw_param(*args); end - def on_op(tok); end - def on_opassign(*args); end - def on_operator_ambiguous(*args); end - def on_param_error(*args); end - def on_paren(*args); end - def on_period(tok); end - def on_qsymbols_add(list, item); end - def on_qsymbols_beg(tok); end - def on_qsymbols_new(*args); end - def on_qwords_add(list, item); end - def on_qwords_beg(tok); end - def on_qwords_new(*args); end - def on_rational(tok); end - def on_rbrace(tok); end - def on_redo(*args); end - def on_regexp_add(list, item); end - def on_regexp_beg(tok); end - def on_regexp_end(tok); end - def on_regexp_literal(*args); end - def on_regexp_new(*args); end - def on_rescue_mod(*args); end - def on_rest_param(*args); end - def on_retry(*args); end - def on_return(*args); end - def on_return0(*args); end - def on_rparen(tok); end - def on_sclass(*args); end - def on_semicolon(tok); end - def on_stmts_add(list, item); end - def on_stmts_new(*args); end - def on_string_add(list, item); end - def on_string_concat(*args); end - def on_string_dvar(*args); end - def on_string_embexpr(*args); end - def on_super(*args); end - def on_symbeg(tok); end - def on_symbol(*args); end - def on_symbol_literal(*args); end - def on_symbols_add(list, item); end - def on_symbols_beg(tok); end - def on_symbols_new(*args); end - def on_tlambda(tok); end - def on_tlambeg(tok); end - def on_top_const_field(*args); end - def on_tstring_beg(tok); end - def on_tstring_content(tok); end - def on_tstring_end(tok); end - def on_undef(*args); end - def on_unless(*args); end - def on_unless_mod(*args); end - def on_until(*args); end - def on_until_mod(*args); end - def on_var_alias(*args); end - def on_var_field(*args); end - def on_var_ref(*args); end - def on_vcall(*args); end - def on_when(*args); end - def on_while(*args); end - def on_while_mod(*args); end - def on_word_add(list, item); end - def on_word_new(*args); end - def on_words_add(list, item); end - def on_words_beg(tok); end - def on_words_new(*args); end - def on_words_sep(tok); end - def on_xstring_add(list, item); end - def on_xstring_literal(*args); end - def on_xstring_new(*args); end - def on_yield(*args); end - def on_yield0(*args); end - def on_zsuper(*args); end - def parse; end - def root; end - def shebang_line; end - def tokens; end - - private - - def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end - def add_token(token, data); end - def comment_starts_line?(charno); end - def compile_error(msg); end - def freeze_tree(node = T.unsafe(nil)); end - def insert_comments; end - def on_aref(*args); end - def on_aref_field(*args); end - def on_array(other); end - def on_assoc_new(*args); end - def on_assoclist_from_args(*args); end - def on_bare_assoc_hash(*args); end - def on_body_stmt(*args); end - def on_bodystmt(*args); end - def on_comment(comment); end - def on_const_path_ref(*args); end - def on_dyna_symbol(sym); end - def on_embdoc(text); end - def on_embdoc_beg(text); end - def on_embdoc_end(text); end - def on_hash(*args); end - def on_label(data); end - def on_lambda(*args); end - def on_lbracket(tok); end - def on_params(*args); end - def on_parse_error(msg); end - def on_program(*args); end - def on_rbracket(tok); end - def on_rescue(exc, *args); end - def on_sp(tok); end - def on_string_content(*args); end - def on_string_literal(*args); end - def on_top_const_ref(*args); end - def on_unary(op, val); end - def on_void_stmt; end - def visit_event(node); end - def visit_event_arr(node); end - def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end -end - -YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) -YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash) -YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash) - -class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base - def initialize(source, filename); end - - def encoding_line; end - def enumerator; end - def frozen_string_line; end - def parse; end - def shebang_line; end - def tokenize; end -end - -class YARD::Parser::Ruby::TokenResolver - include ::Enumerable - include ::YARD::CodeObjects::NamespaceMapper - - def initialize(source, namespace = T.unsafe(nil)); end - - def each; end - - protected - - def last_sep; end - def last_sep=(v); end - def next_object; end - def next_object=(v); end - def object; end - def object=(v); end - def skip_group; end - def skip_group=(v); end - - private - - def lookup(toktype, name); end - def object_resolved_types(obj = T.unsafe(nil)); end - def pop_state; end - def push_state; end - - class << self - def state_attr(*attrs); end - end -end - -class YARD::Parser::SourceParser - def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end - - def contents; end - def file; end - def file=(_arg0); end - def globals; end - def parse(content = T.unsafe(nil)); end - def parser_type; end - def tokenize(content); end - - private - - def convert_encoding(content); end - def parser_class; end - def parser_type=(value); end - def parser_type_for_filename(filename); end - def post_process; end - - class << self - def after_parse_file(&block); end - def after_parse_file_callbacks; end - def after_parse_list(&block); end - def after_parse_list_callbacks; end - def before_parse_file(&block); end - def before_parse_file_callbacks; end - def before_parse_list(&block); end - def before_parse_list_callbacks; end - def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end - def parse_string(content, ptype = T.unsafe(nil)); end - def parser_type; end - def parser_type=(value); end - def parser_type_extensions; end - def parser_type_extensions=(value); end - def parser_type_for_extension(extension); end - def parser_types; end - def parser_types=(value); end - def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end - def tokenize(content, ptype = T.unsafe(nil)); end - def validated_parser_type(type); end - - private - - def parse_in_order(*files); end - end -end - -YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) -YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) -YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) -YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) -YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) -class YARD::Parser::UndocumentableError < ::RuntimeError; end -YARD::ROOT = T.let(T.unsafe(nil), String) -module YARD::Rake; end - -class YARD::Rake::YardocTask < ::Rake::TaskLib - def initialize(name = T.unsafe(nil)); end - - def after; end - def after=(_arg0); end - def before; end - def before=(_arg0); end - def files; end - def files=(_arg0); end - def name; end - def name=(_arg0); end - def options; end - def options=(_arg0); end - def stats_options; end - def stats_options=(_arg0); end - def verifier; end - def verifier=(_arg0); end - - protected - - def define; end -end - -module YARD::Registry - extend ::Enumerable - - class << self - def [](path); end - def all(*types); end - def at(path); end - def checksum_for(data); end - def checksums; end - def clear; end - def delete(object); end - def delete_from_disk; end - def each(&block); end - def instance; end - def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end - def load!(file = T.unsafe(nil)); end - def load_all; end - def load_yardoc(file = T.unsafe(nil)); end - def locale(name); end - def lock_for_writing(file = T.unsafe(nil), &block); end - def locked_for_writing?(file = T.unsafe(nil)); end - def paths(reload = T.unsafe(nil)); end - def po_dir; end - def po_dir=(dir); end - def proxy_types; end - def register(object); end - def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end - def root; end - def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end - def single_object_db; end - def single_object_db=(v); end - def yardoc_file; end - def yardoc_file=(v); end - def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end - - private - - def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end - def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end - def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end - def partial_resolve(namespace, name, type = T.unsafe(nil)); end - def thread_local_resolver; end - def thread_local_store; end - def thread_local_store=(value); end - end -end - -YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String) -YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String) -YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String) - -class YARD::RegistryResolver - include ::YARD::CodeObjects::NamespaceMapper - - def initialize(registry = T.unsafe(nil)); end - - def lookup_by_path(path, opts = T.unsafe(nil)); end - - private - - def collect_namespaces(object); end - def lookup_path_direct(namespace, path, type); end - def lookup_path_inherited(namespace, path, type); end - def split_on_separators_match; end - def starts_with_default_separator_match; end - def starts_with_separator_match; end - def validate(obj, type); end -end - -class YARD::RegistryStore - def initialize; end - - def [](key); end - def []=(key, value); end - def checksums; end - def delete(key); end - def destroy(force = T.unsafe(nil)); end - def file; end - def get(key); end - def keys(reload = T.unsafe(nil)); end - def load(file = T.unsafe(nil)); end - def load!(file = T.unsafe(nil)); end - def load_all; end - def locale(name); end - def lock_for_writing(file = T.unsafe(nil), &block); end - def locked_for_writing?(file = T.unsafe(nil)); end - def paths_for_type(type, reload = T.unsafe(nil)); end - def proxy_types; end - def put(key, value); end - def root; end - def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end - def values(reload = T.unsafe(nil)); end - def values_for_type(type, reload = T.unsafe(nil)); end - - protected - - def checksums_path; end - def load_yardoc; end - def object_types_path; end - def objects_path; end - def proxy_types_path; end - - private - - def all_disk_objects; end - def load_checksums; end - def load_locale(name); end - def load_object_types; end - def load_proxy_types; end - def load_root; end - def load_yardoc_old; end - def write_checksums; end - def write_complete_lock; end - def write_object_types; end - def write_proxy_types; end -end - -module YARD::Serializers; end - -class YARD::Serializers::Base - def initialize(opts = T.unsafe(nil)); end - - def after_serialize(data); end - def before_serialize; end - def exists?(object); end - def options; end - def serialize(object, data); end - def serialized_path(object); end -end - -class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base - def initialize(opts = T.unsafe(nil)); end - - def basepath; end - def basepath=(value); end - def exists?(object); end - def extension; end - def extension=(value); end - def serialize(object, data); end - def serialized_path(object); end - - private - - def build_filename_map; end - def encode_path_components(*components); end - def mapped_name(object); end -end - -class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base - def initialize(cmd); end - - def serialize(_object, data); end -end - -class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base - def initialize(wrap = T.unsafe(nil)); end - - def serialize(_object, data); end - - private - - def word_wrap(text, _length = T.unsafe(nil)); end -end - -class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer - def initialize(yfile); end - - def checksums_path; end - def complete?; end - def complete_lock_path; end - def deserialize(path, is_path = T.unsafe(nil)); end - def lock_for_writing; end - def locked_for_writing?; end - def object_types_path; end - def objects_path; end - def processing_path; end - def proxy_types_path; end - def serialize(object); end - def serialized_path(object); end - - private - - def dump(object); end - def internal_dump(object, first_object = T.unsafe(nil)); end -end - -module YARD::Server - class << self - def register_static_path(path); end - end -end - -class YARD::Server::Adapter - def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end - - def add_library(library); end - def document_root; end - def document_root=(_arg0); end - def libraries; end - def libraries=(_arg0); end - def options; end - def options=(_arg0); end - def router; end - def router=(_arg0); end - def server_options; end - def server_options=(_arg0); end - def start; end - - class << self - def setup; end - def shutdown; end - end -end - -module YARD::Server::Commands; end - -class YARD::Server::Commands::Base - def initialize(opts = T.unsafe(nil)); end - - def adapter; end - def adapter=(_arg0); end - def body; end - def body=(_arg0); end - def caching; end - def caching=(_arg0); end - def call(request); end - def command_options; end - def command_options=(_arg0); end - def headers; end - def headers=(_arg0); end - def path; end - def path=(_arg0); end - def request; end - def request=(_arg0); end - def run; end - def status; end - def status=(_arg0); end - - protected - - def cache(data); end - def not_found; end - def redirect(url); end - def render(object = T.unsafe(nil)); end - - private - - def add_cache_control; end -end - -class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand - def index; end - def index=(_arg0); end - def run; end -end - -class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Server::DocServerHelper - - def index; end - def not_found; end - def run; end - - private - - def object_path; end -end - -class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand - def run; end -end - -class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base - def initialize(opts = T.unsafe(nil)); end - - def call(request); end - def incremental; end - def incremental=(_arg0); end - def library; end - def library=(_arg0); end - def options; end - def options=(_arg0); end - def serializer; end - def serializer=(_arg0); end - def single_library; end - def single_library=(_arg0); end - def use_fork; end - def use_fork=(_arg0); end - - private - - def call_with_fork(request, &block); end - def call_without_fork(request); end - def can_fork?; end - def fulldoc_template; end - def load_yardoc; end - def not_prepared; end - def restore_template_info; end - def save_default_template_info; end - def setup_library; end - def setup_yardopts; end -end - -YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass) - -class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base - def options; end - def options=(_arg0); end - def run; end -end - -class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions - def adapter; end - def adapter=(_arg0); end - def libraries; end - def libraries=(_arg0); end - def serialize; end - def serialize=(_arg0); end - def template; end - def template=(_arg0); end - def type; end - def type=(_arg0); end -end - -class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions - def adapter; end - def command; end - def command=(_arg0); end - def each(&block); end - def frames; end - def frames=(_arg0); end - def library; end - def serialize; end - def serializer; end - def single_library; end -end - -class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Templates::Helpers::BaseHelper - - def run; end -end - -class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base - include ::WEBrick::HTTPUtils - include ::YARD::Server::Commands::StaticFileHelpers - - def run; end -end - -class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Templates::Helpers::BaseHelper - include ::YARD::Templates::Helpers::ModuleHelper - include ::YARD::Server::DocServerHelper - - def query; end - def query=(_arg0); end - def results; end - def results=(_arg0); end - def run; end - def visible_results; end - - private - - def search_for_object; end - def serve_normal; end - def serve_xhr; end - def url_for(object); end -end - -class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand - include ::WEBrick::HTTPUtils - include ::YARD::Server::Commands::StaticFileHelpers - - def run; end -end - -YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array) - -module YARD::Server::Commands::StaticFileHelpers - include ::WEBrick::HTTPUtils - - def favicon?; end - def static_template_file?; end - - private - - def find_file(adapter, url); end - - class << self - def find_file(adapter, url); end - end -end - -module YARD::Server::DocServerHelper - def abs_url(*path_components); end - def base_path(path); end - def mtime(file); end - def mtime_url(file); end - def router; end - def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - def url_for_file(filename, anchor = T.unsafe(nil)); end - def url_for_frameset; end - def url_for_index; end - def url_for_list(type); end - def url_for_main; end -end - -class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer - def initialize(_command = T.unsafe(nil)); end - - def serialized_path(object); end - - private - - def urlencode(name); end -end - -class YARD::Server::FinishRequest < ::RuntimeError; end -class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end - -class YARD::Server::LibraryVersion - def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end - - def ==(other); end - def eql?(other); end - def equal?(other); end - def gemspec; end - def hash; end - def name; end - def name=(_arg0); end - def prepare!; end - def ready?; end - def source; end - def source=(_arg0); end - def source_path; end - def source_path=(_arg0); end - def to_s(url_format = T.unsafe(nil)); end - def version; end - def version=(_arg0); end - def yardoc_file; end - def yardoc_file=(_arg0); end - - protected - - def load_yardoc_from_disk; end - def load_yardoc_from_gem; end - def source_path_for_disk; end - def source_path_for_gem; end - def yardoc_file_for_gem; end - - private - - def load_source_path; end - def load_yardoc_file; end - def serializer; end -end - -class YARD::Server::NotFoundError < ::RuntimeError; end - -class YARD::Server::Router - include ::YARD::Server::StaticCaching - include ::YARD::Server::Commands - - def initialize(adapter); end - - def adapter; end - def adapter=(_arg0); end - def call(request); end - def docs_prefix; end - def list_prefix; end - def parse_library_from_path(paths); end - def request; end - def request=(_arg0); end - def search_prefix; end - def static_prefix; end - - protected - - def final_options(library, paths); end - def route(path = T.unsafe(nil)); end - def route_docs(library, paths); end - def route_index; end - def route_list(library, paths); end - def route_search(library, paths); end - def route_static(library, paths); end -end - -module YARD::Server::StaticCaching - def check_static_cache; end -end - -class YARD::Server::WebrickAdapter < ::YARD::Server::Adapter - def start; end -end - -class YARD::Server::WebrickServlet < ::WEBrick::HTTPServlet::AbstractServlet - def initialize(server, adapter); end - - def adapter; end - def adapter=(_arg0); end - def do_GET(request, response); end -end - -class YARD::StubProxy - def initialize(path, transient = T.unsafe(nil)); end - - def _dump(_depth); end - def hash; end - def method_missing(meth, *args, &block); end - - class << self - def _load(str); end - end -end - -YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer) -YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) -module YARD::Tags; end - -class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective - def after_parse; end - - protected - - def method_name; end - def method_signature; end - - private - - def create_attribute_data(object); end - def readable?; end - def writable?; end -end - -class YARD::Tags::DefaultFactory - def parse_tag(tag_name, text); end - def parse_tag_with_name(tag_name, text); end - def parse_tag_with_options(tag_name, text); end - def parse_tag_with_title_and_text(tag_name, text); end - def parse_tag_with_types(tag_name, text); end - def parse_tag_with_types_and_name(tag_name, text); end - def parse_tag_with_types_and_title(tag_name, text); end - def parse_tag_with_types_name_and_default(tag_name, text); end - - private - - def extract_name_from_text(text); end - def extract_title_and_desc_from_text(text); end - def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end - def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end -end - -YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String) -YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String) - -class YARD::Tags::DefaultTag < ::YARD::Tags::Tag - def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end - - def defaults; end -end - -class YARD::Tags::Directive - def initialize(tag, parser); end - - def after_parse; end - def call; end - def expanded_text; end - def expanded_text=(_arg0); end - def handler; end - def object; end - def parser=(_arg0); end - def tag; end - def tag=(_arg0); end - - protected - - def inside_directive?; end - def parser; end -end - -class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive - def call; end -end - -class YARD::Tags::GroupDirective < ::YARD::Tags::Directive - def call; end -end - -class YARD::Tags::Library - def initialize(factory = T.unsafe(nil)); end - - def abstract_tag(text); end - def api_tag(text); end - def attr_reader_tag(text); end - def attr_tag(text); end - def attr_writer_tag(text); end - def attribute_directive(tag, parser); end - def author_tag(text); end - def deprecated_tag(text); end - def directive_create(tag_name, tag_buf, parser); end - def endgroup_directive(tag, parser); end - def example_tag(text); end - def factory; end - def factory=(_arg0); end - def group_directive(tag, parser); end - def has_directive?(tag_name); end - def has_tag?(tag_name); end - def macro_directive(tag, parser); end - def method_directive(tag, parser); end - def note_tag(text); end - def option_tag(text); end - def overload_tag(text); end - def param_tag(text); end - def parse_directive(tag, parser); end - def private_tag(text); end - def raise_tag(text); end - def return_tag(text); end - def scope_directive(tag, parser); end - def see_tag(text); end - def since_tag(text); end - def tag_create(tag_name, tag_buf); end - def todo_tag(text); end - def version_tag(text); end - def visibility_directive(tag, parser); end - def yield_tag(text); end - def yieldparam_tag(text); end - def yieldreturn_tag(text); end - - private - - def directive_call(tag, parser); end - def send_to_factory(tag_name, meth, text); end - - class << self - def default_factory; end - def default_factory=(factory); end - def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end - def define_tag(label, tag, meth = T.unsafe(nil)); end - def directive_method_name(tag_name); end - def factory_method_for(tag); end - def factory_method_for_directive(directive); end - def instance; end - def labels; end - def sorted_labels; end - def tag_method_name(tag_name); end - def transitive_tags; end - def transitive_tags=(_arg0); end - def visible_tags; end - def visible_tags=(_arg0); end - - private - - def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end - end -end - -class YARD::Tags::MacroDirective < ::YARD::Tags::Directive - def call; end - - private - - def anonymous?; end - def attach?; end - def class_method?; end - def expand(macro_data); end - def find_or_create; end - def new?; end - def warn; end -end - -class YARD::Tags::MethodDirective < ::YARD::Tags::Directive - def after_parse; end - def call; end - - protected - - def create_object; end - def method_name; end - def method_signature; end - def sanitized_tag_signature; end - def use_indented_text; end -end - -YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) - -class YARD::Tags::OptionTag < ::YARD::Tags::Tag - def initialize(tag_name, name, pair); end - - def pair; end - def pair=(_arg0); end -end - -class YARD::Tags::OverloadTag < ::YARD::Tags::Tag - def initialize(tag_name, text); end - - def docstring; end - def has_tag?(name); end - def is_a?(other); end - def kind_of?(other); end - def method_missing(*args, &block); end - def name(prefix = T.unsafe(nil)); end - def object=(value); end - def parameters; end - def signature; end - def tag(name); end - def tags(name = T.unsafe(nil)); end - def type; end - - private - - def parse_signature; end - def parse_tag(text); end -end - -class YARD::Tags::ParseDirective < ::YARD::Tags::Directive - def call; end -end - -module YARD::Tags::RefTag - def owner; end - def owner=(_arg0); end -end - -class YARD::Tags::RefTagList - def initialize(tag_name, owner, name = T.unsafe(nil)); end - - def name; end - def name=(_arg0); end - def owner; end - def owner=(_arg0); end - def tag_name; end - def tag_name=(_arg0); end - def tags; end -end - -class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive - def call; end -end - -class YARD::Tags::Tag - def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end - - def explain_types; end - def name; end - def name=(_arg0); end - def object; end - def object=(_arg0); end - def tag_name; end - def tag_name=(_arg0); end - def text; end - def text=(_arg0); end - def type; end - def types; end - def types=(_arg0); end -end - -class YARD::Tags::TagFormatError < ::RuntimeError; end - -class YARD::Tags::TypesExplainer - class << self - def explain(*types); end - def explain!(*types); end - end -end - -class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type - def initialize(name, types); end - - def to_s(_singular = T.unsafe(nil)); end - def types; end - def types=(_arg0); end -end - -class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType - def to_s(_singular = T.unsafe(nil)); end -end - -class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type - def initialize(name, key_types, value_types); end - - def key_types; end - def key_types=(_arg0); end - def to_s(_singular = T.unsafe(nil)); end - def value_types; end - def value_types=(_arg0); end -end - -class YARD::Tags::TypesExplainer::Parser - include ::YARD::CodeObjects - - def initialize(string); end - - def parse; end - - class << self - def parse(string); end - end -end - -YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash) - -class YARD::Tags::TypesExplainer::Type - def initialize(name); end - - def name; end - def name=(_arg0); end - def to_s(singular = T.unsafe(nil)); end - - private - - def list_join(list); end -end - -class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive - def call; end -end - -module YARD::Templates; end - -module YARD::Templates::Engine - class << self - def generate(objects, options = T.unsafe(nil)); end - def register_template_path(path); end - def render(options = T.unsafe(nil)); end - def template(*path); end - def template!(path, full_paths = T.unsafe(nil)); end - def template_paths; end - def template_paths=(_arg0); end - def with_serializer(object, serializer); end - - private - - def find_template_paths(from_template, path); end - def set_default_options(options = T.unsafe(nil)); end - def template_module_name(path); end - end -end - -module YARD::Templates::ErbCache - class << self - def clear!; end - def method_for(filename); end - end -end - -module YARD::Templates::Helpers; end - -module YARD::Templates::Helpers::BaseHelper - def format_object_title(object); end - def format_object_type(object); end - def format_source(value); end - def format_types(list, brackets = T.unsafe(nil)); end - def globals; end - def h(text); end - def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end - def link_include_file(file); end - def link_include_object(obj); end - def link_object(obj, title = T.unsafe(nil)); end - def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end - def linkify(*args); end - def object; end - def object=(_arg0); end - def owner; end - def run_verifier(list); end - def serializer; end - def serializer=(_arg0); end -end - -module YARD::Templates::Helpers::FilterHelper - def is_class?(object); end - def is_method?(object); end - def is_module?(object); end - def is_namespace?(object); end -end - -module YARD::Templates::Helpers::HtmlHelper - include ::YARD::Templates::Helpers::MarkupHelper - include ::YARD::Templates::Helpers::ModuleHelper - include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper - - def anchor_for(object); end - def charset; end - def format_object_name_list(objects); end - def format_types(typelist, brackets = T.unsafe(nil)); end - def h(text); end - def html_markup_asciidoc(text); end - def html_markup_html(text); end - def html_markup_markdown(text); end - def html_markup_none(text); end - def html_markup_org(text); end - def html_markup_pre(text); end - def html_markup_rdoc(text); end - def html_markup_ruby(source); end - def html_markup_text(text); end - def html_markup_textile(text); end - def html_markup_textile_strict(text); end - def html_syntax_highlight(source, type = T.unsafe(nil)); end - def html_syntax_highlight_plain(source); end - def htmlify(text, markup = T.unsafe(nil)); end - def htmlify_line(*args); end - def insert_include(text, markup = T.unsafe(nil)); end - def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end - def link_include_file(file); end - def link_include_object(obj); end - def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end - def mtime(_file); end - def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - def resolve_links(text); end - def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end - def signature_types(meth, link = T.unsafe(nil)); end - def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - def url_for_file(filename, anchor = T.unsafe(nil)); end - def url_for_frameset; end - def url_for_index; end - def url_for_list(type); end - def url_for_main; end - - private - - def convert_method_to_overload(meth); end - def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end - def parse_codeblocks(html); end - def parse_lang_for_codeblock(source); end - def tag_attrs(opts = T.unsafe(nil)); end - def urlencode(text); end - - class << self - def urlencode(text); end - end -end - -YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) -YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) - -module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper - include ::YARD::Templates::Helpers::ModuleHelper - - def html_syntax_highlight_ruby(source); end - - private - - def clean_token_object(token_obj); end - def html_syntax_highlight_ruby_legacy(source); end - def html_syntax_highlight_ruby_ripper(source); end -end - -module YARD::Templates::Helpers::Markup; end - -class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup - def initialize(text); end - - def fix_typewriter(html); end -end - -class YARD::Templates::Helpers::Markup::RDocMarkup - def initialize(text); end - - def from_path; end - def from_path=(_arg0); end - def to_html; end - - private - - def fix_dash_dash(text); end - def fix_typewriter(text); end -end - -YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup - -class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml - def initialize; end - - def accept_paragraph(*args); end - def from_path; end - def from_path=(_arg0); end - def handle_special_HYPERLINK(special); end -end - -module YARD::Templates::Helpers::MarkupHelper - def load_markup_provider(type = T.unsafe(nil)); end - def markup_class(type = T.unsafe(nil)); end - def markup_file_contents(contents); end - def markup_for_file(contents, filename); end - def markup_provider(type = T.unsafe(nil)); end - - class << self - def clear_markup_cache; end - def markup_cache; end - def markup_cache=(_arg0); end - end -end - -YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash) -YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp) -YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash) - -module YARD::Templates::Helpers::MethodHelper - def format_args(object); end - def format_block(object); end - def format_code(object, _show_lines = T.unsafe(nil)); end - def format_constant(value); end - def format_lines(object); end - def format_return_types(object); end -end - -module YARD::Templates::Helpers::ModuleHelper - def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end -end - -module YARD::Templates::Helpers::TextHelper - def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end - def h(text); end - def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end - def indent(text, len = T.unsafe(nil)); end - def signature(meth); end - def title_align_right(text, col = T.unsafe(nil)); end - def wrap(text, col = T.unsafe(nil)); end - - private - - def resolve_links(text); end -end - -module YARD::Templates::Helpers::UMLHelper - def format_path(object); end - def h(text); end - def tidy(data); end - def uml_visibility(object); end -end - -class YARD::Templates::Section < ::Array - def initialize(name, *args); end - - def <<(*args); end - def ==(other); end - def [](*args); end - def any(item); end - def dup; end - def eql?(other); end - def inspect; end - def name; end - def name=(_arg0); end - def place(*args); end - def push(*args); end - def to_a; end - def unshift(*args); end - - private - - def parse_sections(args); end -end - -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 - - def initialize(opts = T.unsafe(nil)); end - - def T(*path); end - def class; end - def class=(_arg0); end - def erb(section, &block); end - def file(basename, allow_inherited = T.unsafe(nil)); end - def init; end - def inspect; end - def options; end - def options=(value); end - def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end - def section; end - def section=(_arg0); end - def sections(*args); end - def superb(sect = T.unsafe(nil), &block); end - def yieldall(opts = T.unsafe(nil), &block); end - - protected - - def erb_file_for(section); end - def erb_with(content, filename = T.unsafe(nil)); end - - private - - def add_options(opts = T.unsafe(nil)); end - def cache(section); end - def cache_filename(section); end - def render_section(section, &block); end - def set_ivars; end - def with_section; end - - class << self - def extra_includes; end - def extra_includes=(_arg0); end - def include_extra(template, options); end - def included(klass); end - end -end - -module YARD::Templates::Template::ClassMethods - def initialize(path, full_paths); end - - def S(*args); end - def T(*path); end - def find_file(basename); end - def find_nth_file(basename, index = T.unsafe(nil)); end - def full_path; end - def full_path=(_arg0); end - def full_paths; end - def is_a?(klass); end - def new(*args); end - def path; end - def path=(_arg0); end - def reset_full_paths; end - def run(*args); end - - private - - def include_inherited(full_paths); end - def include_parent; end - def load_setup_rb; end -end - -class YARD::Templates::TemplateOptions < ::YARD::Options - def __globals; end - def default_return; end - def default_return=(_arg0); end - def embed_mixins; end - def embed_mixins=(_arg0); end - def embed_mixins_match?(mixin); end - def format; end - def format=(_arg0); end - def globals; end - def globals=(_arg0); end - def hide_void_return; end - def hide_void_return=(_arg0); end - def highlight; end - def highlight=(_arg0); end - def index; end - def index=(_arg0); end - def markup; end - def markup=(_arg0); end - def markup_provider; end - def markup_provider=(_arg0); end - def no_highlight; end - def no_highlight=(value); end - def object; end - def object=(_arg0); end - def owner; end - def owner=(_arg0); end - def page_title; end - def page_title=(_arg0); end - def serialize; end - def serialize=(_arg0); end - def serializer; end - def serializer=(_arg0); end - def template; end - def template=(_arg0); end - def type; end - def type=(_arg0); end - def verifier; end - def verifier=(_arg0); end -end - -YARD::VERSION = T.let(T.unsafe(nil), String) - -class YARD::Verifier - def initialize(*expressions); end - - def add_expressions(*expressions); end - def call(object); end - def expressions; end - def expressions=(value); end - def method_missing(sym, *args, &block); end - def run(list); end - - protected - - def o; end - def object; end - - private - - def create_method_from_expressions; end - def modify_nilclass; end - def parse_expression(expr); end - def unmodify_nilclass; end -end - -YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array)